mirror of
https://github.com/danbulant/discord.js
synced 2026-05-21 21:39:10 +00:00
12 lines
281 B
JavaScript
12 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!');
|