Discord bots can take over various automated tasks in your Discord channels. The pre­requis­ite is having your own Discord server. Keep reading to find out how to make a Discord bot and how to add a pre-made one to your server.

Cheap domain names – buy yours now
  • Free website pro­tec­tion with SSL Wildcard included
  • Free private re­gis­tra­tion for greater privacy
  • Free Domain Connect for easy DNS setup

The short version: How to make a Discord bot

How to integrate a pre-pro­grammed Discord bot:

  1. Select a Discord bot from a website offering a Discord bot list (e.g. ‘top.gg’).
  2. Click on ‘Invite’ on the bot website.
  3. Select your server and grant the bot the per­mis­sions it needs.
  4. The bot will then be added to your Discord server.

How to make your own Discord bot:

  1. Turn on ‘Developer mode’ in your Discord account.
  2. Click on ‘Discord API’.
  3. In the Developer portal, click on ‘Ap­plic­a­tions’. Log in again and then, back in the ‘Ap­plic­a­tions’ menu, click on ‘New Ap­plic­a­tion’.
  4. Name the bot and then click ‘Create’.
  5. Go to the ‘Bot’ menu and generate a token using ‘Add Bot’.
  6. Program your bot using the bot token and save the file.
  7. Define other details for your bot under ‘General In­form­a­tion’.
  8. Click on ‘OAuth2’, activate ‘bot’, set the per­mis­sions, and then click on ‘Copy’.
  9. Select your server to add your bot to it.

What is a Discord bot?

Bots have become a central part of the Internet. These automated programs can take on tasks and fulfill them in­de­pend­ently. For example, a bot could act as a customer service associate, collect data from social media, or crawl the web to improve search machines. In Discord, users can employ bots with a variety of features, in order to improve the func­tion­al­ity or en­ter­tain­ment value of their server.

Some popular forms of Discord bots include:

  • Discord music bots, which auto­mat­ic­ally play music
  • Voice command bots for voice control of Discord
  • All­round­er bots that combine various functions, e.g. gaming in­teg­ra­tion, automatic no­ti­fic­a­tions, and mod­er­at­ing
  • Trans­la­tion bots
  • Stat­ist­ics bots for analysing server data

Discord bots are par­tic­u­larly practical for the gaming community, as they can auto­mat­ic­ally com­mu­nic­ate with a dedicated Valheim server or Minecraft server, evaluate user behaviour, and establish a con­nec­tion between Discord and the gaming server.

Tip

If Discord isn’t for you and you prefer working with TeamSpeak, check out our guide on setting up your own TeamSpeak server.

How to make a Discord bot: A step-by-step guide

The first thing you’ll need is a Discord account, if you don’t already have one. Then use the account to set up your own Discord server, which is where you’ll integrate the bot. From this point you have two options for using a Discord bot:

Integrate a pre-pro­grammed Discord bot

If you’re not a skilled pro­gram­mer, your best bet is to use one of the numerous pre-pro­grammed bots out there. You can find a wide variety of bots with either broad or spe­cial­ised functions on websites like ‘top.gg’.

To use a pre-pro­grammed Discord bot, take the following steps:

Step 1: Go to a Bot list website such as ‘top.gg’. Once you’ve chosen a bot, you’ll be re­dir­ec­ted to the bot website. Al­tern­at­ively, you can go directly to the website of your chosen Discord bot. For example, if you know that you want to download the music bot Hydra, you can go directly to the website ‘hydra.bot’.

Step 2: Click on ‘Invite’ on the bot page to invite the Discord bot to your Discord server.

Step 3: Enter the login in­form­a­tion for your Discord account.

Step 4: At this point, a window should open where you can choose the server that you want to add the Discord bot to. Grant the bot the necessary per­mis­sions.

Step 5: The bot will then appear as a user in your channel. You can usually read about the bot’s features and commands in the bot in­struc­tions or using the command ‘.help’.

Creating your own Discord bot

If you don’t want to rely on a pre-made bot and prefer to write your own program, you’ll need to have basic pro­gram­ming knowledge. That makes this option sig­ni­fic­antly more com­plic­ated for beginners. However, with the ap­pro­pri­ate skills, it’s ab­so­lutely possible to create your own Discord bot in the pro­gram­ming language of your choice. To this end, Discord offers a developer API where you can register a new ap­plic­a­tion including a token (password).

You’ll need:

  • Your own Discord server
  • Pro­gram­ming tools such as node.js (a JavaS­cript tool) or Python 3
  • Notepad++ (text editor)

Follow these steps to create your own Discord bot:

Step 1: Log into your Discord account and click on ‘Advanced’ in the sidebar. Then activate ‘Developer Mode’. Then click on ‘Discord API’.

Step 2: In the Developer Portal, click on ‘Ap­plic­a­tions’ in the sidebar on the left. Log in to your account again and then click on ‘New Ap­plic­a­tion’.

Step 3: Give your bot a name and then click on ‘Create’.

Step 4: Click on ‘Bot’ in the left sidebar, then click on ‘Add Bot’ to create a bot account and bot token. Take note of the token, as this is the how the bot com­mu­nic­ates with the API.

Step 5: Now it’s time to start pro­gram­ming your bot. Since this involves advanced pro­gram­ming steps, you should have previous knowledge of pro­gram­ming languages and tools. Use an IDEA pro­gram­ming en­vir­on­ment, pro­gram­ming tools like Python 3 or node.js, or a text editor like Notepad++. After you’ve written the bot, save the bot file.

Step 6: Back in Developer Mode in Discord, go to ‘General In­form­a­tion’ and set details like the de­scrip­tion and app icon.

Step 7: Go to ‘OAuth2’ and in the field ‘Scopes’ tick the box for ‘bot’. Then set the per­mis­sions for your Discord bot.

Step 8: The au­then­tic­a­tion link including client ID should look as follows:

https://discordapp.com/oauth2/authorize?&client_id=IHRE-ID&scope=bot&permission=8

Click on ‘Copy’ to add the bot link to your server.

Step 9: Select your Discord server in order to add your bot.

Go to Main Menu