From da5d92812e4fcf7d39f7a9177689894f8b7a1b66 Mon Sep 17 00:00:00 2001 From: Sardonyx Date: Thu, 16 Apr 2020 13:09:26 +0300 Subject: [PATCH] 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 * Update docs/examples/webhook.js Co-Authored-By: Crawl * Update webhook.js * Capitilized ID Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com> Co-authored-by: Crawl --- docs/examples/webhook.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/examples/webhook.js b/docs/examples/webhook.js index 451ac58b33fd..ab91152ea02a 100644 --- a/docs/examples/webhook.js +++ b/docs/examples/webhook.js @@ -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