A Discord bot to manage CS2 PUGs. Connects to DatHost API.
If you wish to test the bot without any setup, feel free to invite it to your Discord server.
-
Install PostgreSQL 9.5 or higher.
sudo apt-get install postgresql
-
Clone the project to your server
git clone https://github.com/thboss/g5-discord-bot
-
Install the necessary libraries.
pip3 install -r requirements.txt
-
Run the psql tool with
sudo -u postgres psql
and create a database by running the following commands:CREATE ROLE "g5" WITH LOGIN PASSWORD 'yourpassword'; CREATE DATABASE "g5" OWNER g5;
-
Be sure to replace
yourpassword
with your own password. -
Quit psql with
\q
-
-
Edit the configuration file
cp config.json.template config.json && nano config.json
-
Apply the database migrations
python3 migrate.py up
-
Finally, start the bot
python3 run.py
- Python 3.8+
- DatHost account.
- You must enable server members intent and server message intent on your bot developers portal.
- Required Permissions:
- Manage Roles
- Manage Channels
- Manage Messages
- Send Messages
- Read Message/View Channels
- Attach Files
- Use Slash Commands
- Connect
- Move Members
- Create lobby: Create a lobby using command
/create-lobby
(You can create unlimited number of lobbies as you need)- Note: This command requires Administrator permissions.
- Link Steam: To participate in lobbies, link your Steam account with the command
/link-steam
. This will grant you the Linked role, indicating you’re ready to join lobbies.- You need to link your account only once, but you can reuse this command to change you linked steam.
- Join Lobby: Simply, join the lobby voice channel, and bot will automatically add you to the queue.
- Leave the lobby channel to remove from the queue.
- Match Setup: Once the lobby is full, the bot will automatically handle the game setup and notify all players as well as create teams channels, ensuring each player is moved to their respective channel.
- Cameron Shinn for his initial implementation of csgo-league-bot.