How To Make a Discord Bot
This guide will walk you through all the steps on how to make a Discord bot in as little as 10 minutes.

Short answer:
- Create a Discord account and server. You’ll need a server to host your bot.
- Open the Discord Developer Portal. Click New Application to name and create your bot.
- Add a bot user. Go to the Bot tab, toggle it on, and copy your token.
- Set permissions. Under OAuth2 → URL Generator, select “bot,” choose permissions, and copy the generated invite link.
- Invite the bot to your server. Paste the link in your browser, authorize it, and your bot will appear online instantly.
Discord describes itself as a place to talk, hang out, and build relationships with communities and friends.
What started as a user-friendly VoIP (voice over internet protocol) and instant messaging platform for gamers quickly evolved into the perfect place to host an online community for businesses and hobbyists alike.
If you've ever joined or run a Discord server, chances are you're familiar with Discord bots, those helpful autonomous agents or chatbots that can do things like:
- Welcome new members
- Moderate communities
- Set reminders
- Perform polls
- Measure statistics and produce reports on demand
Discord bots have become a key differentiator for the platform, allowing community owners to take engagement, moderation, and interactivity within their communities to the next level.
Are you eager to harness the power of Discord bots for your own community?
In this guide, we'll walk you through everything you need to know, covering both no-code methods for beginners and coding a bot from scratch using Python for those who want full customization.
What is a Discord bot?
A Discord bot is a programmable tool that automates tasks, manages communities, or enhances functionality within a Discord server.
Bots are built using code — often in languages like JavaScript (Node.js) or Python, and interact with Discord’s API to perform actions as a human user would do, but faster and automatically.
At its core, a Discord bot monitors for certain commands or events in a server (like a new member joining or someone typing a specific word) and responds based on its programmed logic.
This allows server admins to streamline moderation, customize engagement, and create interactive experiences.
Here are some common ways Discord bots are used:
- Moderation. Automatically delete spam messages, warn users, or enforce rules.
- Information delivery. Provide news updates, server statistics, or game data.
- Entertainment. Play music, create memes, or host trivia games.
- Utility tools. Manage roles, schedule events, or log activity.
- Custom interactions. Respond to specific keywords, trigger minigames, or handle slash commands.
In short, a Discord bot acts as your server’s digital assistant, working 24/7 to automate repetitive tasks, foster engagement, and keep communities organized.
Different types of Discord bots
While you can manage Discord channels and servers manually, bots can help boost engagement and increase your productivity by performing a variety of tasks automatically.
Here are some cool ideas for Discord bots you can make and add to a server.
- Translation bot. This type of bot can help you translate different languages. It can be incredibly useful when dealing with a community of bot users from across the globe.
- Moderation bot. With this bot, you can monitor all communication happening in a channel and delete messages that violate certain terms.
- Statistics bot. This bot can help analyze data on a Discord server, allowing you to gain crucial insight into key metrics.
- Voice command bot. This type of bot lets users perform specific actions on a server by speaking custom commands instead of typing them. For example, members could use voice triggers to automate tasks like playing music, switching channels, or activating moderation tools.
- Music bot. As the name suggests, this type of bot can play music on a Discord channel automatically.
Creating a Discord bot
From setting up a Discord account to establishing permissions and adding the bot to a Discord server, here are the steps for creating a custom no-code Discord bot.
1. Create a Discord account and server
You can't create a Discord bot without having an account and setting up your own server.
Go to Discord.com and create an account.
Once you've created a Discord account, proceed and log in. You will be directed to the following dashboard.
To create a server, click on the Add a Server button, which is highlighted below.
Pressing the Add a Server button directs you to a pop-up screen with options to either create a custom server or select one from templates like gaming, school club, and study group.
In this example, we’ll be creating a custom server, so click on the Create My Own button.
You’ll be directed to another pop-up window where you have to choose whether the server is for just a few friends or a bigger community.
In our case, we’ll select the For a club or community option.
Once you've made a selection, you're directed to the following pop-up window — where you can add your server's name and profile icon. Proceed to add your server details and click the Create button.
Note: The image icon is optional.
And with that, you've created a Discord server. You can invite friends to join the server, as well as personalize it further by adding channels and an icon.
2. Click "Applications"
In the previous step, we set up a Discord account and created a custom server.
Now, we can dive into the fun stuff — creating a Discord bot.
Start by navigating to the Discord Developer Portal in your browser and selecting the Applications tab.
3. Name your application
Click on the New Application button and add a name for your Discord application in the pop-up window.
Finally, press the Create button to add the bot.
4. Select "Bot"
Once you've named the bot, you’re directed to the following page containing general information about the bot and other settings.
Navigate to the Bot tab on the page to access the authorization flow settings and privilege gateway intents.
It's a good idea to make sure Public Bot under the Authorization Flow section (shown in the following image) is switched on.
This allows public users to invite your bot to their servers.
The Requires OAuth2 Code Grant is switched off unless the service you’re developing requires it.
5. Copy the bot's token
The bot's client ID and Discord API token will be displayed as soon as you create it.
Be sure to copy the token, as it can only be viewed once when generated.
If you forget or lose access to your token, you’ll need to regenerate a new one.
You can find your bot's token in the red, blurred-out section.
6. Navigate to the “OAuth2 URL Generator” tab
The next step is to add the scopes and bot permissions.
First, select the OAuth2 tab and navigate to the OAuth2 URL Generator section.
7. Tick the "bot" checkbox under "SCOPES"
Just tick the checkbox here.
8. Set bot permissions and copy the generated URL
Scroll to the bottom to tick any permissions required for your bot to function.
You can also grant all permissions by checking the Administrator checkbox. But you have to be careful since this could lead to security vulnerabilities.
The invite URL will be autogenerated depending on the permissions you select.
If the bot URL is not autogenerating, return to the Authorization Flow section of the Bot tab and make sure that Requires OAuth2 Code Grant is switched off.
9. Paste the bot's URL into a browser and invite it to your server
In step one, we created a custom server.
We can now add the bot to the server by navigating to the URL generated in the above step.
If you have multiple servers, they’ll appear in the dropdown window. In our case, we’re adding the bot to the Example server.
Once you choose a server, click the Continue button to proceed.
You’ll be allowed to confirm the permissions you previously selected. If everything looks good, click Authorize.
Also, you may have to confirm you're a human to finalize the process.
Congratulations! You have successfully created a bot and added it to your server.
Popular Discord bots
Whether they're used to welcome new users, reply to certain messages, provide general information about the server, or ban individuals violating certain terms, bots bring powerful functionality to Discord.
Here are popular examples of Discord bots:
- ProBot. This bot lets you welcome new members, react to messages, assign roles to users, and reward the most active users. ProBot can also be used for moderation, including detecting offensive messages and banning users.
- YAGPDB. This bot is popular in large communities because it automates moderation tasks (like filtering spam or blocking prohibited words) with minimal setup. It also lets admins create reaction-based roles so members can assign themselves to groups.
- Dyno. This bot stands out for its highly customizable automoderation tools, which help servers control spam, manage rule violations, and keep chats organized.
- Carl-bot. Popular for advanced reaction roles, starboard, logging, and powerful automod tools, Carl-bot is often used by fast-growing communities that need granular control over permissions and message handling.
- Helper.gg. This bot helps businesses manage tickets, create staff accounts, and control their permissions. It's also capable of automatic language translation, enabling organizations to target audiences in different regions.
- Dank Memer. It helps you boost your community's engagement by generating and posting memes on various servers.
- Arcane. If leveling and community roles are vital to your channel, Arcane is the general-purpose Discord server management bot that meets your needs.
- Community Hubs. This bot allows members to post content in specific channels or hubs, making it easy for other users to find whatever they're looking for.
- MEE6. This organization provides the gold standard for Discord server management bots. It welcomes new users, enforces server rules, and adds levels, XP, and roles.
- Midjourney. This bot enables users to generate images using Midjourney's text-to-image AI from within the Discord environment.
How to add bots to Discord servers
Adding bots to Discord servers typically follows the same process.
You have to invite the bot to your server, set permissions, and provide necessary authorization.
We'll demonstrate how this process works by adding the Dank Memer bot to a Discord server.
1. Navigate to the Dank Memer website
In your browser, navigate to the Dank Memer website, which is shown below.
Click on the Add to Your Server button to invite the bot to your Discord server.
2. Invite the Discord bot to the server
Clicking on the Add to Your Server button will direct you to the following page, where you’ll select the server to which you wish to add the Dank Memer bot.
Press the Select a Server dropdown button and choose your desired Discord server.
In this case, we’ll be adding the bot to the Example server.
After selecting a server, click on the Continue button to proceed.
3. Grant necessary permissions
Clicking on the Continue button will direct you to the following page, where you’ll have to grant permissions to the bot.
In this case, the Dank Memer bot requires the checked permissions to work.
This requirement means that revoking some of the permissions may cause the bot not to function as expected.
Leave the default permissions as they are and scroll down the page.
Click on the Authorize button at the bottom of the page to complete the authorization process.
4. Check the Discord server
Now that we've invited the Dank Memer bot to our server, let's determine if the integration was successful.
Open the Discord application and then navigate to the server where you added the Dank Memer bot.
You should see the following page if the bot was added successfully.
You can use different commands to interact with the Dank Memer bot.
For instance, the /clap slash command allows the bot to add "clapping hands" emojis to your message in real time.
Different ways to develop Discord bots
You can add many third-party bots to your Discord server.
But if you want extra features and more control over what the bot does, consider developing a custom bot from scratch.
Programming languages like JavaScript, Python, and C++ have numerous built-in libraries you can use to create and configure Discord bots.
At the same time, an NPM (Node Package Manager, a software package manager and registry for JavaScript) can give you access to additional code libraries.
Read on to learn how to build a Discord bot using Python.
Developing a Discord bot using Python
Python is a powerful language with a wide variety of open-source dependencies you can use to create Discord bots, such as Discord.py.
To illustrate, we’ll create a simple bot that can reply to limited user messages using Python 3.
1. Install the Discord library
To install discord.py, first open your system’s command line:
- Mac: Press Command + Space, type Terminal, then press Enter
- Windows: Press Windows + R, type cmd, then press Enter
Once the terminal window is open, run:
pip install discord.py
2. Create a new project
On your desktop, create a new folder and give it a name.
Inside the folder, add two new files: main.py and artbot.py.
3. Add logic to the artbot.py file
Open the artbot.py file in your code editor. This file will contain all the bot's logic.
Start by importing the Discord library at the top of the file using the following line of code.
Import discord
Next, let's add a function that will store the bot's feedback.
In this simple example, the bot will only be replying "Hi there" or "Hello user. Welcome" to user inputs.
So, the function will look like this:
def handle_user_messages(msg) ->str:
message = msg.lower() #Converts all inputs to lower case if(message == 'hi'):
return 'Hi there'
if(message ==’hello’):
Return ‘Hello user. Welcome’
Next, we write the following function to handle communication between the user and the bot.
This function checks the user's input and sends a reply to a channel. It's also useful for error handling, ensuring that your app doesn’t crash in production.
async def processMessage(message, user_message):
try:
botfeedback = handle_user_messages(user_message)
await message.channel.send(botfeedback)
except Exception as error:
print(error)
Finally, we create the main (runBot) function to control our bot. The function contains your bot token, which is required for authorization.
You can get a Discord token from your bot's application page. It's always a good idea to store the token in a separate .env file for privacy.
But in this example, we're aiming for simplicity.
The runBot function also has nested methods (on_ready and on_message) that are triggered when the bot is online and when a new message is detected.
def runBot():
discord_token = 'MTE0MjAyNTYyNDkzMjg0MzU5MA.GAvF0I.ZRAgSRHz6YlEaIek2y5dyvybJJTc7Jhr10hI2E' client = discord.Client(intents=discord.Intents.default())@client.event
async def on_ready():
print({client.user}, 'is live') @client.event
async def on_message(message):
if message.author == client.user:
return
await processMessage(message, 'hi')
client.run(discord_token)
4. Add main method
We can add the main method required to execute the program in the main.py file, as follows.
import artbot
if __name__ =='__main__':
artbot.runBot()
5. Test
Now that we've created a bot, we can start it up and then add it to a server.
If you followed the above steps correctly, you should see the following outputs when you run your bot application.
Your command line should look like this:
The Artbot bot should also reply to messages in any server it's added to.
As shown below, the Artbot generates a new Discord message when the user types "hello" in a channel.
With this setup, the bot goes offline when you switch off your computer. For continued performance, consider saving the bot code on GitHub or hosting the application on a web server.
Overall, are Discord bots hard to make?
Generally, making Discord bots depends on your level of expertise, experience, and programming knowledge of languages like Python and C++.
If you're familiar with the Discord development environment and have some coding skills, even beginners can find making Discord bots relatively simple.
If you lack the necessary technical knowledge, you can still make Discord bots using third-party tools with drag-and-drop user interfaces.
Numerous online tutorials and learning resources on platforms like Udemy can help you create a Discord bot.
Hire a bot developer for the best results
In this article, we covered how to make a Discord bot, along with some of the more popular Discord bots already out there.
While creating a simple Discord bot is relatively easy, building something custom that's as powerful as some of the more popular bots available to the public will require programming skills in languages like Python, the language used for coding Discord bots.
You can hire an experienced programmer on Upwork who is familiar with Discord.js, discord.py, and other related technologies to create a custom Discord bot for your server.
They can help you build, deploy, and maintain your bot effectively. Hire a bot developer on Upwork today.
How to make a Discord bot: FAQs
Creating a Discord bot can be both exciting and challenging. Let's review some common questions related to developing Discord bots.
Is it safe to give a bot administrator permissions?
No, giving a bot administrator permissions is not always. Granting administrator access gives the bot full control over your server, which can pose security risks if the bot is poorly coded or malicious. It's best to enable only the specific permissions your bot needs to function.
Can Discord bots work across multiple servers?
Yes, a single Discord bot can be invited to and operate on multiple servers at once. However, you may need to set up different configurations on each server to handle custom rules, channels, and roles.
Do Discord bots cost money to run?
The Discord bot itself can be free to build, but there may be costs if you host it on cloud services like AWS, Google Cloud, or Heroku. Costs depend on factors such as server uptime, storage, and the number of users interacting with the bot.
Can I update my Discord bot after it's deployed?
Yes, you can update your Discord bot at any time by editing its code or configuration and redeploying it to the server. Many developers use version control tools like GitHub to manage updates and roll back changes if needed.
What skills are required to create a Discord bot?
Creating a Discord bot has prerequisite skills and capabilities, including knowledge of programming languages like Python or JavaScript.
Familiarity with libraries such as discord.js or discord.py and frameworks like Node.js is also important. A good programmer can help you navigate these tools effectively.
Can I develop a Discord bot for mobile platforms like Android?
Yes, you can develop Discord bots that interact with mobile platforms, including Android. However, the bot itself will run on a server or cloud service and communicate with users through the Discord app.
How can I ensure my Discord bot remains online?
To keep your Discord bot online, consider hosting it on a cloud platform or server.
This type of bot management ensures continuous operation despite environmental variables you can't account for. Additionally, setting up notifications can help you monitor the bot's status and address any downtime quickly.
Are there prebuilt libraries to help with Discord bot development?
Yes, several prebuilt libraries like discord.js and discord.py simplify the process of creating a Discord bot and assist with implementation. These libraries provide the necessary tools to interact with the Discord API.
Upwork is not affiliated with and does not sponsor or endorse any of the tools or services discussed in this article. These tools and services are provided only as potential options, and each reader and company should take the time needed to adequately analyze and determine the tools or services that would best fit their specific needs and situation.











.png)
.avif)























.avif)






