Setting Up a Test Server and Bot Account
Setting up a Test Server¶
- Create a Discord Server if you haven't got one already to use for testing.
Setting up a Bot Account¶
- Go to the Discord Developers Portal.
- Click on the
New Application
button, enter your desired bot name, and clickCreate
. - In your new application, go to the
Bot
tab, clickAdd Bot
, and confirmYes, do it!
- Change your bot's
Public Bot
setting off so only you can invite it, save, and then get your Bot Token with theCopy
button.Note: DO NOT post your bot token anywhere public, or it can and will be compromised.
- Save your Bot Token somewhere safe to use in the project settings later.
- In the
OAuth2
tab, grab the Client ID. - Replace
<CLIENT_ID_HERE>
in the following URL and visit it in the browser to invite your bot to your new test server.
https://discordapp.com/api/oauth2/authorize?client_id=<CLIENT_ID_HERE>&permissions=8&scope=bot
Obtain the IDs¶
First, enable developer mode in your client so you can easily copy IDs.
- Go to your
User Settings
and click on theAppearance
tab. - Under
Advanced
, enableDeveloper Mode
.
Guild ID¶
Right click the server icon and click Copy ID
.
Channel ID¶
Right click a channel name and click Copy ID
.
Role ID¶
Right click a role and click Copy ID
.
The easiest way to do this is by going to the role list in the guild's settings.
Emoji ID¶
Insert the emoji into the Discord text box, then add a backslash \
right before the emoji and send the message.
The result should be similar to the following
<:bbmessage:511950877733552138>
The long number you see, in this case 511950877733552138
, is the emoji's ID.
Webhook ID¶
Once a webhook is created, the ID is found in the penultimate part of the URL.
For example, in the following URL, 661995360146817053
is the ID of the webhook.
https://discordapp.com/api/webhooks/661995360146817053/t-9mI2VehOGcPuPS_F8R-6mB258Ob6K7ifhtoxerCvWyM9VEQug-anUr4hCHzdbhzfbz