1.0.2 • Published 4 years ago

discord-embed-generator v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

discord-embed-generator

An error, success, information, and warning embed generator for Discord.JS.

Documentation

Installing

To install this module, type into your terminal:

npm install wolfiediscord/discord-embed-generator

Utilizing

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.

Usage

embed.error(msg)

Type: Function

Parameters:

ParameterTypeDescription
msgStringThe embed content.

Returns: Object

Example:

let error = embed.error('Uh oh! Something went wrong!');
message.channel.send({embed: error});

embed.success(msg)

Type: Function

Parameters:

ParameterTypeDescription
msgStringThe embed content.

Returns: Object

Example:

let success = embed.success('The task completed successfully!');
message.channel.send({embed: success});

embed.info(msg)

Type: Function

Parameters:

ParameterTypeDescription
msgStringThe embed content.

Returns: Object

Example:

let info = embed.info('The weather is Sunny.');
message.channel.send({embed: info});

embed.warn(msg)

Type: Function

Parameters:

ParameterTypeDescription
msgStringThe embed content.

Returns: Object

Example:

let warning = embed.warn('Are you sure you want to do that?');
message.channel.send({embed: warning});