mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
docs(Webhook): id and token information (#3962)
* Documented how to get ID and Token of a webhook * Update docs/examples/webhook.js Co-Authored-By: Sugden <28943913+NotSugden@users.noreply.github.com> * Explained whats the response body * Update docs/examples/webhook.js Co-Authored-By: Crawl <icrawltogo@gmail.com> * Update docs/examples/webhook.js Co-Authored-By: Crawl <icrawltogo@gmail.com> * Update webhook.js * Capitilized ID Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com> Co-authored-by: Crawl <icrawltogo@gmail.com>
This commit is contained in:
@@ -6,8 +6,13 @@
|
||||
|
||||
// Import the discord.js module
|
||||
const Discord = require('discord.js');
|
||||
|
||||
// Create a new webhook
|
||||
/*
|
||||
* Create a new webhook
|
||||
* The Webbooks ID and token can be found in the URL, when you request that URL, or in the response body.
|
||||
* https://discordapp.com/api/webhooks/12345678910/T0kEn0fw3Bh00K
|
||||
* ^^^^^^^^^^ ^^^^^^^^^^^^
|
||||
* Webhook ID Webhook Token
|
||||
*/
|
||||
const hook = new Discord.WebhookClient('webhook id', 'webhook token');
|
||||
|
||||
// Send a message using the webhook
|
||||
|
||||
Reference in New Issue
Block a user