How to Create a Discord Bot on Arch Linux

0

Full article

Creating a bot on Discord it's easy, and most importantly it's completely free. In this tutorial you'll learn how to create and host a Discord bot on Arch Linux.

What is Discord?

Discord is a chatting software for gamers.

Why would i need a bot on my Discord?

Who doesn't love bots. You can use bots to automate a lot of your daily tasks without having to do it manually.

Features of Discord Red Bot

Moderation features (kick/ban/softban/hackban, mod-log, filter, chat cleanup)
Trivia (lists are included and can be easily added)
Music features (YouTube, SoundCloud, local files, playlists, queues)
Stream alerts (Twitch, Mixer, Smashcast)
Slot machines
Custom commands
Imgur/gif search

Installing and Setting up the Bot

Step 1 - Install Requirements

pacman -S python python-pip git ffmpeg base-devel openssl libffi libsodium

Step 2 - Clone the Bot

git clone -b develop --single-branch https://github.com/Twentysix26/Red-DiscordBot.git

Step 3 - Update the Bot Requirements

cd Red-DiscordBot
python launcher.py

Step 4 - Create a bot account

  1. Go to Discord developer dashboard (https://discordapp.com/developers/applications/me)
  2. Click to "Create an application", then give your bot a name, description and click save.
DiscordBot-Ebblr

  1. Click to "Bot" then click to "Add bot" then answer with "Yes,Do it"

add-bot

5. Click to "Reveal token" and copy it as the launcher will ask you to put the token in order to login to bot.

Step 5 -  Authorize bot

Go to Developer Portal, click to "OAuth2" next select bot and choose permissions you want to give to the bot, then copy the generated url and paste it to your browser and add the bot to the channel you want.

You should see a window like this.

Step 5.1 - Logging in to Bot

cd to the Red-DiscordBot folder, then run the following command to start the launcher.

cd Red-DiscordBot
python launcher.py

This is what the launcher looks like.

start-the-launcher

Launcher allows you to run the bot, update, install requirements and fixing issues.

5.2 Setting up Bot Online

On the launcher screen, type 2 and press enter, right after that the launcher will ask you to paste the token of your bot, paste token and press enter to continue. Next, you'll be asked to choose a prefix, set a prefix for your bot, now prefix it's important and make sure to put something that you'll remember as that prefix will be used to run commands on bot.  

After that, you'll need to configure admin and moderator role, leave it default if you don't want to add admin and moderator.

That's it!

Time to test the bot, login to your discord account and check if bot it's appearing online on the side at your friends list. Click to your bot and issue a command.

Executing commands correctly

botprefixcommand  where botprefix is "ebblr" and the command is "command"

so to run help command you need to type ebblrhelp

Remember: You can issue commands directly from discord message box.

Running ping command.

Common Issues

If your bot does not show up online, restart the launcher and re-run the bot. If the bot does not respond to commands that you're executing make sure you've given the right permissions to your bot.

Author

Comments