mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
* Bring some docs up to date, as well as add a new example * Missed an exclamation mark * Do requested changes * Do suggestions * Same suggestions for the other examples * Show people that they can also use reply with embeds * Typos in embed.js example * Remove object example from embeds, too complex Suggested by Yukine * Some changes, some requested changes * Add moderation examples! * Add attachment examples * Missing dot * Fix spacing * Requested Changes * Quote consistency * Tfw you break the syntax
13 lines
277 B
JavaScript
13 lines
277 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.send('I am now alive!');
|