An error, success, information, and warning embed generator for Discord.JS.
To install this module, type into your terminal:
npm install wolfiediscord/discord-embed-generator
First, you need to require the module.
const embed = require('discord-embed-generator');
Then, that's it! Read the usage below to actually utilize it.
Type: Function
Parameters:
Parameter | Type | Description |
---|---|---|
msg |
String | The embed content. |
Returns: Object
Example:
let error = embed.error('Uh oh! Something went wrong!');
message.channel.send({embed: error});
Type: Function
Parameters:
Parameter | Type | Description |
---|---|---|
msg |
String | The embed content. |
Returns: Object
Example:
let success = embed.success('The task completed successfully!');
message.channel.send({embed: success});
Type: Function
Parameters:
Parameter | Type | Description |
---|---|---|
msg |
String | The embed content. |
Returns: Object
Example:
let info = embed.info('The weather is Sunny.');
message.channel.send({embed: info});
Type: Function
Parameters:
Parameter | Type | Description |
---|---|---|
msg |
String | The embed content. |
Returns: Object
Example:
let warning = embed.warn('Are you sure you want to do that?');
message.channel.send({embed: warning});