1.0.0 • Published 8 years ago
discord-webhooks v1.0.0
discord-webhooks
A simple way of getting started with Discord webhooks.
Getting started
Install:
npm install --save discord-webhooks
And run:
const DiscordWebhook = require("discord-webhooks");
let myWebhook = new DiscordWebhook("https://discordapp.com/api/webhooks/channel_id/token")
myWebhook.on("ready", () => {
myWebhook.execute({
content:"Hello from a webhook",
username:"Mr Webhook",
avatar_url:"https://example.com/image.png"
});
});
myWebhook.on("error", (error) => {
console.warn(error);
});
Discord documentation
Read more about webhooks on the Discord Documentation.
1.0.0
8 years ago