This package has been deprecated

Author message:

Creating embeds is a simple task that should not be done through one function. Please use Discord.js's functions instead.

embed-creator
TypeScript icon, indicating that this package has built-in type declarations

1.2.4 • Public • Published

Embed Creator

This module assumes you have basic knowledge of Discord.js.

A Discord Embed Creator

Key

const ce = require("embed-creator");
 
msg.channel.send(ce(
  "hex code color", "author object", "title",
  "description",
  "fields object",
  "footer object",
  "image object", "is timestamp enabled (true/false)"
));

Edit Example

const ce = require("embed-creator");
msg.channel.send("A message with no embed!").then(theM => {
  theM.edit(ce(
    "#FFFFFF", null, "This message has an embed now! :D"
  ));
});

Object Examples

Hex, Title, Description, Timestamp

#FFFFFF, null, "Title", "Description", null, null, null, false

Author

{"name": "Fire", "icon_url": msg.guild.displayAvatarURL(), "url": "https://www.google.com"}

Fields

[{"name": "Field 1", "value": "Value 1"}, {"name": "Field 2", "value": "Value 2"}]

Footer

{"text": "This is footer text!", "icon_url": msg.guild.iconURL()}

Images

{"thumbnail": msg.guild.iconURL(), "image": msg.author.displayAvatarURL()}

Example

This example will show you how to use every part of embedCreator.

const ce = require("embed-creator");
 
msg.channel.send(ce(
  "#FEAFEA", {"name": "Fire", "icon_url": msg.author.displayAvatarURL(), "url": "https://www.google.com"}, "Title", "Description",
  [{"name": "Field 1", "value": "Value 1"}, 
   {"name": "Field 2", "value": "Value 2"}],
  {"text": "This is footer text!", "icon_url": msg.guild.iconURL()}, 
  {"thumbnail": msg.guild.iconURL(), "image": msg.author.displayAvatarURL()}, false
));

Example1

Package Sidebar

Install

npm i embed-creator

Weekly Downloads

7

Version

1.2.4

License

MIT

Unpacked Size

4.17 kB

Total Files

4

Last publish

Collaborators

  • firecontroller1847