discord-webhook-api
How to install
npm install discord-webhook-api --save
Usage
discord-webhook-api will create a rich embed for you and then send it to webhook you provide.
.addTitle(title)
will add a title to your embed.
.addImageUrl(imageUrl)
will add a image to your embed.
.addFooter(footer)
will add a footer to your embed. If nothing is specified then it will default to 'Discord Webhook API'.
.addTimestamp()
will add a timestamp.
.addColor(color)
lets you pick a color for the embed.
.addDescription(description)
is the main body for your embed.
.sendTo(webhookUrl)
this is where you add the webhook URL from discord.
Example
const webhookHandler = ; const newWebhook = ; newWebhook ;
License
discord-webhook-api is licensed under MIT License.