# Generate Discord Token
This section deals with generating of what's called a Discord token. A token essentially is a long string of letters and is another way of gaining access to Discord besides the usual method of a username password pair.
Although there are ways to generate a token for your own Discord account, for this excercise however, we would instead create a bot token or a token that belongs to a Bot.
Why should we need to use a bot account and not our own?
Well, it's generally bad practice as per Discord and may even lead to account deactivation if used excessively. Not to mention it could also compromise your account if you accidently expose it somewhere.
With a bot account however, the element of risk is low as you can limit a bot's access to only a certain number of servers or channels. Discord also recommends using a bot account for any activity that's automated.
# Building the Bot
To get a Bot token we need to, well add a Bot, right?
The first step is log into to Discord and head over to the Applications page.
Tap on the New Application button to register a new application.
- In the dialog give it a name you like. If you're unsure just type Textcord and hit Create.
The newly created application would like this.
- Tap on the application tile you just created, find the Bot section in the left hand Settings pane and tap on it.
You should see a view like this.
Tap on the Add Bot button and confirm your action in the dialog that follows.
You've just created a Bot! 🎉 Now is the time to get creative and choose a name for this Bot.
This is the name the people will in channels when you post a text using SMS so make sure this sounds dope. You can also change your bot's profile picture from here.
Your newly created Bot.
Click on Save Changes and this should be all about creating a bot.
# Adding the Bot To Your Servers
Since our super dope bot is ready we can now add it to one or more Discord servers.
On the same screen, tap on the OAuth2 section in the left hand Settings pane.
Scroll down to the Scopes section and check the "bot"option.
After checking the bot option, the Bot Permissions section will appear. In this section you need to enable a few checkboxes. This is shown in the image below.
Bot permissions.
- Pass the link that's in bottom of the bot section to the admin of the discord server. Open the link yourself if you're yourself the admin or have Manage Server permission.
Bot URL.
- After opening the link a dialog will appear which will contain the list of servers that this can be added to.
Add to Server.
Choose the server and tap on Continue.
On the next screen confirm all permissions and tap on Authorize.
The bot is now added to your server 🎉!
# Getting the Token
The bot has now been added to your server but there is one additional step we still need to do. We need to get hold of the bot token.
In the left hand pane choose Bot. This is same section wherein you created the bot.
Beneath the Token, tap on the Copy button to copy the token to your clipboard. You can tap on the Click to Reveal Token to see the token yourself.
# Proceed Further?
Proceed Further?
You now have successfully created a bot, added the bot to your server(s) and as well taken hold of the our Super Dope Bot's token!
We can now proceed further.
Head over to the Go Live page or click on the link at the bottom.
← Introduction Go Live! →