1.1.2 โข Published 2 years ago
dann-embed v1.1.2
Easy Embed Maker
๐งก An easy discord embed message maker for newbies, just a function, try it yourself!
Installation
$ npm install dann-embed
- Discord.js v13
Quick Example
const { Client, Intents } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS] });
const Embed = require('dann-embed');
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.on('messageCreate', async message => {
if (message.content === '!ping') {
Embed(message).setSuccess("Pong!").send();
}
});
client.login('token');
Main Function
const Embed = require('dann-embed');
Embed(message); // Class => MessageEmbed
Message Class
Class Functions
.setText(text)
Set embed description.
PARAMETER | TYPE | OPTIONAL |
---|---|---|
text | string |
.setError(text)
Set error message, with default red color of embed.
PARAMETER | TYPE | OPTIONAL |
---|---|---|
text | string |
.setSuccess(text)
Set success message, with default green color of embed.
PARAMETER | TYPE | OPTIONAL |
---|---|---|
text | string |
.send(channel)
PARAMETER | TYPE | OPTIONAL |
---|---|---|
channel | GuildChannel | ๐ธ |
Join to us!
- ๐ Util's package
- ๐ OnlyChill Discord Server