Before you can put your bot online and bring it to life, you have to (1) Create a bot application through Discord (2) Generate a secret token that’ll act as the “key” to controlling your bot, and (3) Have your bot join your server!

Once you have these in place, it’s just a matter of using your token to make your bot do what you want it to do programmatically. If you want to learn how to use your token in code, take a look at the first few portions of this guide. We have examples of doing this in Java, C#, JavaScript, and Python.

Bringing your Discord bot to life

Right now we’ll focus on adding your bot to Discord, getting your token, and finally putting your bot online!

For a detailed step by step process (illustrated), you’ll want to follow this guide to generating your bot token.

Discord Bot Token Generation Guide

You’ll start by going to the Discord Developer Portal on discordapp.com and creating a new application.

Once your application is created, you’ll give your bot a name, a description, and even a nifty icon if you want to really bring it to life.

Once you have your bot’s information filled out, it’s just a matter of going to the “Bot” tab in the Developer Portal and clicking the “Add Bot” button. Up to this point we created an application, but as soon as you click “Add Bot” it converts your plain old Discord application to a bot application.

You’ll see the message, “A wild bot has appeared!”, and then have the option to reveal your token.

Step 5 in the Discord Bot Token Guide walks you through adding your bot to your server, and creating the URL (link) you’ll need for this to work successfully.

Now what? Next steps

If you’ve followed the guide above to a tee, you should see your bot appear in your Discord server as OFFLINE.

Ping Pong Bot Offline on Discord

This is okay, and this is all normal. Your bot will show as offline until you bring up and run your bot’s code.

Your bot’s program acts as the “control system” / “server” for your bot; it communicates with Discord through their API to get a little trigger when an event happens on Discord and then reacts to that trigger through the code you wrote.

If you have your bot user application created and you see your bot in your server, the next step is to follow one of the bot programming guides we provided (in any language of your choice).

As soon as you get to the last step where you turn on your application, you’ll see your bot come online in your server and start responding and reacting to events!

Discord Ping Pong Bot Live Example

And that’s all there is to it. You have successfully brought your Discord bot to life!

Leave a Reply