Getting your application ready
Images and some contents provided by an idiots guide
Last updated
Images and some contents provided by an idiots guide
Last updated
The first step in creating a bot is to create your own Discord application. The bot will use the Discord API, which requires the creation of an account for authentication purposes. Don't worry though, it's super simple.
You need to be logged in and have a email verified to access this step
Go to Discord Developer Portal, assuming you are already logged in.
Click on Create an application. This brings you to the following page, in which you should simply enter a name for the application (this will be the inital bot username). You don't really need a description or icon, but feel free to add one. Click Save Changes which will create the application itself.
The Client ID on this page will be your bot's user ID. Nothing else on this page is relevant, it is not used in your bot (however, you can enter a description
After creating the application, we need to create the Bot User. Go to the Bot section on the left, then click on Add Bot, then Yes, Do it.
There's a few things you can change here.
Username
to change your bot's username on Discord (this can also be done through code).
Icon
to change the bot's avatar (can also be done with discord.js)
Token
This is your bot's token, which will be used when connecting to discord. See the section below for details.
Public bot
This toggles the ability for other users to add your bot to their server. You can turn this on during development.
Require Oauth2 Code Grant
Don't check this. Just, don't. It's not useful to you and will cause problems if you turn it on.
Ok so, this might be a bit early to do this but it doesn't really matter - even if you haven't written a single line of code for your bot, you can already "invite" it to a server. In order to add a bot, you need Manage Server permissions on that server. This is the only way to add a bot, it cannot use invite links or any other methods.
To generate the link, click on Oauth2 in the app page, and scroll down to Scopes. Check the BOT
scope to generate a link.
Usually, bots are invited with specific permissions which are given to the bot's role on the server. This is optional, but you can set thos permissions in the Bot page, scrolling down to the Bot Permissions section. Check any permissions your bot requires. This modifies the invite link above, which you can then share.
Once you have the link, you can copy it to a browser window and visit it. When you do this, You get shown a window letting you choose the server where to add the bot, simply select the server and click Authorize.
You need to be logged in to Discord on the browser with your account to see a list of servers. You can only add a bot to servers where you have Manage Server permissions.
Alright so, big flashy warning, PAY ATTENTION. This next part is really, really important: Your bot's token is meant to be SECRET. It is the way by which your bot authenticates with the Discord server in the same way that you login to Discord with a username and password. Revealing your token is like putting your password on the internet, and anyone that gets this token can use your bot connection to do things. Like delete all the messages on your server and ban everyone. If your token ever reaches the internet, change it immediately. This includes putting it on pastebin/hastebin, having it in a public github repository, displaying a screenshot of it, anything. GOT IT? GOOD!
With that warning out of the way, on to the next step. The 7Token, as I just mentioned, is the way in which the bot authenticates. To get it, go to the Bot section of the app page, then click Copy to copy it to the clipboard. You can also view your token here if you wish: