# 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?

  1. The first step is log into to Discord and head over to the Applications page.

  2. Tap on the New Application button to register a new application.

New Discord Application

  1. In the dialog give it a name you like. If you're unsure just type Textcord and hit Create.

Created Application The newly created application would like this.

  1. Tap on the application tile you just created, find the Bot section in the left hand Settings pane and tap on it.

Bot You should see a view like this.

  1. Tap on the Add Bot button and confirm your action in the dialog that follows.

  2. 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.

Build a Bot 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.

  1. On the same screen, tap on the OAuth2 section in the left hand Settings pane.

  2. Scroll down to the Scopes section and check the "bot"option.

  3. 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 Bot permissions.

  1. 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 Bot URL.

  1. After opening the link a dialog will appear which will contain the list of servers that this can be added to.

Add to Server Add to Server.

  1. Choose the server and tap on Continue.

  2. 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.

  1. In the left hand pane choose Bot. This is same section wherein you created the bot.

  2. 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.