Discord Race Bot for Assetto Corsa Competizione
- Install Python 3.10 or higher
- Setup the virtual environment using
python -m venv .venv
- Activate the virtual enviroment using
source .venv/bin/activate
or.venv\Scripts\Activate.ps1
- Install the required packages using
pip install -r requirements.txt
- Create a
.env
file in the root directory and add the following:
DISCORD_TOKEN=<your_discord_bot_token>
- Modified
bangbot.service
to match your installation. - cp
bangbot.service
to/etc/systemd/system
- run
sudo systemctl daemon-reload
- run
sudo systemctl enable bangbot.service
- run
service bangbot restart
The bot is configured using the config.json
file. The file is structured as follows:
{
"prefix": [
"!",
"."
]
}
Enable the extensions by adding the file name to the extensions
list in the config.json
file. (Hint: added ! before the extension name to indicate that it is disabled without removing it from the config.)
{
"extensions": [
"bang.systems",
"bang.acc-race",
"bang.event",
"bang.help",
"!bang.poll"
]
}
Copy the _default_.json
from guild
and rename it to the guild id of the server. Modify the settings as you please.
Run the bot using (on Linux):
source .venv/bin/activate
py bot.py
deactivate
and on Windows:
.venv\Scripts\Activate.ps1
py bot.py
deactivate
Besides the basic (ping, welcome message etc.) features, the bot has the following features:
/practice [date]
- Get the practice results with the lap times and laps of the session.
/qualify [date]
- Get the qualify results with the lap times and laps of the session.
/race [date]
- Get the race results of the session and the final standings as well as the fastest lap and penalties.
/event Title of the event
Lots of text for the description of the event.
This will create an embed with 3 colums for Going, Maybe, & Decline where people can click on the reaction emojies to place their choice.