My project for the FMI Python Course 2023
The project represents an implementation of a discord game bot.
You can play Tic-Tac-Toe, Rock-Paper-Scissors, Hangman and Akinator.
More games to be added soon or later.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Download or clone the repository
$ git clone https://github.com/danielgp1/Discord-GameBot.git
- Install the necessary plugins using
$ pip install -r requirements.txt
- Create a Discord Bot in the Discord Developer Portal
https://discord.com/developers/applications
-
Give the bot Administrator Rights and invite it to your server
-
Replace the TOKEN and CHANNEL_ID values in the config.py file
PREFIX = "!"
TOKEN = 'YOUR DISCORD BOT TOKEN'
CHANNEL_ID = YOUR TEXT CHANNEL ID
- To start the bot, run the following file from the project
main.py
In order to be able to play games with the bot, you have to be assigned the Games
role.
First, add the roles Blue,Red and Games to your server. Write !teams
in a text channel and copy the ID of the message
Replace the ourMessageID = ID
with the ID of your message in the functions on_raw_reaction_add
and on_raw_reaction_remove
in main.py
You can be granted the role by clicking on the 🎮 emoji on the message
By writing !games
in a discord channel, you can check the list of the available games.
Click on a desired number reaction to play the corresponding game
- Tic-Tac-Toe
- Rock-Paper-Scissors
- Hangman
- Akinator