Skip to content

A discord bot written in python used within a linux environment (game server control, server control)

License

Notifications You must be signed in to change notification settings

yafraorg/pythondiscordbot

Repository files navigation

Discord Bot written in Python

A discord bot written in python used within a linux environment (game server control, server control)

Based on the excellent guide at https://realpython.com/how-to-make-a-discord-bot-python/

Environment

  • Python 3.6+
  • .env file with DISCORD_TOKEN="xyxyxy"
  • Ubuntu 18.04+ as OS (or any Linux distro)
DISCORD_TOKEN="xyxyxy"
DISCORD_GUILD="ababab"
DISCORD_PREFIX="!"

Configuration and setup

Install dependencies with pip. On ubuntu do:

sudo apt install python3-pip
pip3 install -r requirements.txt

Use different prefixes if you run multiple bots in one guild/server. Register the bot's separately and use their tokens.

In order to start the bot while the system starts, copy as sudo the systemd file discordbot.service into /etc/systemd/system. Adjust the ExecStart and User. Afterwards run:

sudo systemctl enable discordbot
sudo systemctl start discordbot

or reboot instead of sytemctl start.

About

A discord bot written in python used within a linux environment (game server control, server control)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages