

Inside it I'll create a basic button that executes the JavaScript function sendMessage(). In my case I'll just simply create a local HTML file that I'll name index.html. In order to send POST requests to your webhook, you'll have to set up some form of JavaScript environment in which you can execute code. Copy it and save it somewhere, as we will use it later. Then at the bottom, you'll get the unique Webhook URL. Again, that image can later be customized from the JSON post request. Once redirected to the login page and credentials submitted, users have access to their Discord web app dashboard.

In the top right-hand corner, users will see a Login button. You can also adjust the channel, and add a default image. Once registered, users can access their Discord account from their web browser by going to Discord. You'll then be able to specify the name, which is the name that is used when sending messages if none is specifided in the JSON post request. Then head to the Webhooks tab, and hit Create Webhook. To create a Webhook, click the cog next to the channel in which you wish to set up your Webhook:

This works by sending a post request with some JSON data to a unique URL Discord provides when you create your Webhook.ĭiscord provides a feature to create Webhooks, but note that it is only available in server channels, not in direct messages. Let's see how to easily set one up in order for you to integrate it with your app, or even just have fun sending custom messages. Well did you know that it is possible to send automated messages in Discord servers directly from JavaScript? It's called Webhooks. I'm sure you've heard of Discord, the all-in-one voice and text chat app, and maybe you're even using it.
