3.0.8 • Published 7 years ago

discord-embed-maker v3.0.8

Weekly downloads
27
License
MIT
Repository
-
Last release
7 years ago

Discord Embed Maker

Discord Embed Maker is a tool that allows you to easily create embeds for the discord.js library.

  • Compatible with discord.js straight out of the box
  • Easy to use functions

Join the discord server!

https://discord.gg/ceJ4gsX

Installation

Discord Embed Maker requires Node.js 6 or higher to run.

Install the dependencies

$ npm install discord-embed-maker
$ node yourApp.js

For production environments...

$ npm install discord-embed-maker --production
$ node yourApp.js
  • Production requires Git to install

Example

const embed = require('discord-embed-maker');

embed.setTitle(`A fun title!`);
embed.setDescription(`Some description that relates to the title.`);

embed.addField(`Title of the field`, `Value of the field`, true);
embed.addField(`Second field`, `Second field value`).setAuthor(`Some author`);
// You can chain functions!


// In your main JS file
Client.on('message', (message) => {
	if (message.content === '!embed') {
		message.channel.send( { embed: embed } );
	}
})

Documentation

Properties

.author

  • Author for this Embed

.color

  • Color for this Embed

.description

  • Description for this Embed

.fields

  • Fields for this Embed

.file

  • File to upload alongside this Embed

.footer

  • Footer for this Embed

.image

  • Image for this Embed

.thumbnail

  • Thumbnail for this Embed

.timestamp

  • Timestamp for this Embed

.title

  • Title for this Embed

.url

  • URL for this Embed

Methods

.addBlankField([inline])

  • Convenience function for .addField('\u200B', '\u200B', [inline]).

.addField(name, value, [inline])

  • Adds a field to the embed (max 25).

.attachFile(file)

  • Sets the file to upload alongside the embed. This file can be accessed via attachment://fileName.extension when setting an embed image or author/footer icons. Only one file may be attached.

.setAuthor(name, [iconURL], [clickableURL])

  • Sets the author of this embed.

.setColor(color)

  • Sets the color of this embed.

.setDescription(description)

  • Sets the description of this embed.

.setFooter(text, [iconURL])

  • Sets the footer of this embed.

.setImage(imageURL)

  • Set the image of this embed.

.setThumbnail(imageURL)

  • Set the thumbnail of this embed.

.setTimestamp([timestamp])

  • Sets the timestamp of this embed.

.setTitle(title)

  • Sets the title of this embed.

.setURL(clickableURL)

  • Sets the URL of this embed.

New Features!

  • Timestamp support!
  • Add up to 25 fields!

You can also:

  • Set the image of an embed
  • Edit the footer of an embed

Todos

  • Write Tests

License

MIT

3.0.8

7 years ago

3.0.7

7 years ago

3.0.6

7 years ago

3.0.5

7 years ago

3.0.4

7 years ago

3.0.3

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.1.8

7 years ago

1.1.6

7 years ago

1.1.0

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago