Setting Up Discord Bot.

Prashant Gaurav
3 min readMay 7, 2021

This post focuses on how to set up a basic discord bot project. By the end of this post, you’ll have a basic understanding of how a discord bot works behind the scenes and also have a bot that you coded on your server.👾

Getting Started…

To create a bot on discord, you first have to create an application and then add a bot to it. To do this go to and create an application with the New Application button.

You have to have a discord account for this and it should be signed.

Name your Application the way you like. I’ll name mine as tutorial. Now, when the application is created go to the bot tab on the left menu and select bot. Then add bot to your application by clicking add Bot button. Easy enough!

Now that you have created your bot, you need to have a token which you’ll be using in your code to create a bot instance. So go to the bot tab and click on copy under the title Token. This token should be kept confidential. So keep it somewhere safe!. It’ll be used when you’ll customize your bot using discord.py or discord.js

Adding Bot to your server

To create a bot you also need a way to test it, and what better way than to test it on a live server. So, you should first create a discord server, which is pretty simple. Go to https://discord.com/channels/@me and on the left menu click on add a server ->Create My Own->For me and my friends.

Name the server whatever you want. I’ll name mine test server and hit create.
Now you have your own server, Congrats!

To add the bot you just created go back to the developer menu and go to the OAuth2 section which will be right above the Bot on the left menu. Then scroll down to scopes and check the bot scope. You can read about other scopes Here. A URL will appear at the bottom of the list, copy it.

Finally, paste that URL you just copied into your browser which has your discord account logged in. You’ll be directed to a page that looks like the image below. Choose the server you want to add your bot to and click Authorize.

Congratulations you now have a bot that you created and can customize on your server!

Go Ahead and Create Your Own Discord Bot Now!! 😎

--

--

Prashant Gaurav

Hi, I like to write blogs about challenges I faced while working on new tech so that the solution could benefit others & myself in case I forget it later. :P