Skip to main content

How to make a your own Discord bot with Python in 2023. #01


I'm sure that you have heard of discord bots way before reading this article. But have you ever tried to make your own bot with Python? If not, this is the time. Let's get started.

Over time tons of discord bot tutorials have been published, but if you follow them they don't help you to build a functional bot because many of the packages used in them are updated and no longer support older syntaxes.

Here is the full guide to creating your own Discord Bot in 2023 with Python.

STEP 1: Create a Discord account

First of all, we have to set up a developer account to create the bot. Actually, you can use your ordinary discord account to access the discord developer portal, but it is highly recommended to create a separate account for development purposes.

You can create a new discord account with this link: https://discord.com/register

STEP 2: Create a new Application

After creating the discord account, you have to go to the discord developer portal and sign in with your newly-created discord account.

After signing in, go to this link: https://discord.com/developers/applications/ 

and click on the New Application button in the top right corner.








Then you can give a name you like to the new application.



















After checking the Terms and Conditions you can hit the Create button.

STEP 3: Build-A-Bot.


Select Bot from the left sidebar and hit the Add Bot button.












After confirming you will be redirected to this page:













STEP 4: Giving Powers
Then you can give the permissions to the bot. More information about the Intents can be seen under every toggle button.

For this tutorial, I will only enable message content intent as this bot is going to interact with the messages.
You can change them anytime you want.






 











After giving the necessary permissions, hit the Save Changes button.


STEP 5: Adding the Bot to a Server.


Finally, we have to add our bot to a server when we can test it. So, it is highly recommended to create a new server and add the bot to it.


To create a new server follow the instructions below:

Open the discord web app or desktop app ( for the web app: https://discord.com/app) 

Click on the + button to add a new server














Then select create my own, after selecting a category or skipping the question, You can give a name you like to the server.

















Then go back to the developer portal Click on OAuth2 > URL Generator and tick the necessary checkboxes shown in the following picture.














Then copy the link at the bottom of the page and paste it on a new tab and hit enter.

After selecting the server that you want the bot to be added to click continue.
Then you can authorize the bot and after the human verification, you would be able to see your new bot in your server.



















The bot is on your server




That's the basic and now we have to write our code. I will talk about it soon in another tutorial.


Thanks for reading and please subscribe to our youtube channel for the next tutorial.



Comments

Trending Now

Find the Resultant vector of two Vectors With PYTHON!!

NEW ARTICLE:  How to Find the resultant of multiple vectors with Python! Using Python We can do many complex calculations. I learned how to calculate Resultant Vector using a formula with its size and direction in my Physics class. Then, I simply developed a CLI software to calculate the resultant of given two vectors Hope you like it :>) Follow me... Step :1 You need to install python on your computer. No matter what the operating system is you can find the ideal version of python from the official website of Python org And you will need a code editor like VS code and can download it with a simple Google search. (Hope you hate the first step Haha ) Step 2: we use the math module to calculate our resultant vector. The method I used as follows math.radians() : converts degrees to radians math.degrees() : converts radians to degrees math.sqrt()  : find the square root of a number math.atan() :find the tan inverse Step 3: the formula I used to calculate the size of the resultant is as

How to send and receive discord messages with your bot in 2023.

Hello everyone. Welcome back to the Blog of Chamodh today I will show you how to send and receive discord messages with your bot. Before getting started, I remind you that this is the second episode of the series How to make Discord bot in 2023 and if you haven't read the previous one, please read that first as I explain how to create your bot application and add it to a server there. READ:  https://blogofchamodh.blogspot.com/2023/02/how-to-make-your-own-discord-bot-2023.html We don't gonna use virtual environments, IDEs, or any other utility because we can use Replit for our coding purposes.  Let's Get Started. STEP1: Set up Replit It is really simple. Just go to  https://replit.com/~ and sign up if you have never used its service before and create a new Repl. I don't hope to guide you in this as this is an intermediate tutorial. Make sure to select Python as you create the new Repl because we are going to use Python for our back end. STEP 2: Get your token. To run ou