discordjs-embed-converter
v1.2.2
Published
Make RichEmbeds from MessageEmbeds, and some other stuff too.
Downloads
25
Readme
discordjs-embed-converter
Install
npm install discordjs-embed-converter
Usage
MessageEmbed to RichEmbed
Requiring this directly gives a function that can convert MessageEmbeds to RichEmbeds. Example:
const msgEmbedToRich = require("discordjs-embed-converter");
msgEmbedToRich(someMessageEmbed);
Or, if you think that is too vague or something, it also has a circular named msgEmbedToRich.
const msgEmbedToRich = require("discordjs-embed-converter").msgEmbedToRich;
// or
const { msgEmbedToRich } = require("discordjs-embed-converter");
The other way around
There is also a property of the requiring named RichToMsgEmbed, which can convert RichEmbeds to MessageEmbed, however note that it will lose its .message
property.
const richToMsgEmbed = require("discordjs-embed-converter").richToMsgEmbed;
// or
const { richToMsgEmbed } = require("discordjs-embed-converter");
then:
richToMsgEmbed(SomeRichEmbed);