mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
* start blocking out client * proto webhookclient * wee working webhooks * it's all working * run docs * fix jsdoc issues * add example for webhookClient * add example in the examples place * fix docs
13 lines
281 B
JavaScript
13 lines
281 B
JavaScript
/*
|
|
Send a message using a webhook
|
|
*/
|
|
|
|
// import the discord.js module
|
|
const Discord = require('discord.js');
|
|
|
|
// create a new webhook
|
|
const hook = new Discord.WebhookClient('webhook id', 'webhook token');
|
|
|
|
// send a message using the webhook
|
|
hook.sendMessage('I am now alive!');
|