Making a Webhook

With that in mind, if you want to update your Discord server with GitHub commits and pull requests or track analytics from DataDog or anything similar, here's how!

  1. Open your Server Settings and head into the Integrations tab:
  2. Click the "Create Webhook" button to create a new webhook!

Screen_Shot_2020-12-15_at_4.41.53_PM.png

You'll have a few options here. You can:

  •  Edit the avatar: By clicking the avatar next to the Name in the top left
  • Choose what channel the Webhook posts to: By selecting the desired text channel in the  dropdown menu.
  • Name your Webhook: Good for distinguishing multiple webhooks for multiple different services.

You now have your own handy URL / pneumatic tube schoomp-er that you can link to more websites to receive messages from. 

Screen_Shot_2020-12-15_at_4.51.38_PM.png

Quick Example: GitHub Webhook Integration

Since webhooks can't really function on their own and need to be linked to another website to function as intended, I figured it'd be best to include a sample integration for any of you GitHub enthusiasts and code-pushers.

You can use Discord's webhooks to send any code merge or push updates in a repository of yours into a text channel in your server.  

1. Get the webhook URL for the server/channel you want to receive messages:

In my server, I've created a text channel labeled #general-chat and I want my repo updates to post messages here!

Therefore, I'll grab the webhook URL for this channel by pressing the Copy Webhook URL button:

Screen_Shot_2020-12-15_at_4.45.52_PM.png