Skip to content

Commit

Permalink
docs(Webhook): id and token information (#3962)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
3 people authored Apr 16, 2020
1 parent ff3454e commit da5d928
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docs/examples/webhook.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit da5d928

Please sign in to comment.