1.2.2 • Published 8 years ago

discordjs-embed-converter v1.2.2

Weekly downloads
12
License
MIT
Repository
github
Last release
8 years ago

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);
1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago