docs: update docs and examples for #4879 (#5323)

Co-authored-by: Antonio Román <kyradiscord@gmail.com>
This commit is contained in:
Carter
2021-03-28 21:51:42 -06:00
committed by GitHub
parent 624a4464ca
commit 685b2604e4
18 changed files with 56 additions and 58 deletions

View File

@@ -5,15 +5,15 @@
*/
// Import the discord.js module
const Discord = require('discord.js');
const { WebhookClient } = require('discord.js');
/*
* Create a new webhook
* The Webhooks ID and token can be found in the URL, when you request that URL, or in the response body.
* https://discord.com/api/webhooks/12345678910/T0kEn0fw3Bh00K
* ^^^^^^^^^^ ^^^^^^^^^^^^
* ^^^^^^^^^^^ ^^^^^^^^^^^^^^
* Webhook ID Webhook Token
*/
const hook = new Discord.WebhookClient('webhook id', 'webhook token');
const hook = new WebhookClient('webhook id', 'webhook token');
// Send a message using the webhook
hook.send('I am now alive!');