Show player count from your Quake 3 based server through changing the name of a Discord channel on your guild.
Currently tested and working with Jedi Academy and Movie Battles II servers (Jedi Academy mod).
Feel free to test with other Quake 3 games and raise an issue if you encounter any problems.
To install the python requirements you have to run:
pip install -r requirements.txt
For the image generation with IMGKit to work you need to install wkhtmltopdf on your machine too. You can find instructions in the following links:
You'll need to create a bot and add it to your guild for the script to use.
The bot just needs the manage "Manage Channels" permissions to work.
Also you'll need to create a channel for the script to rename with the status.
People usually prefer using a voice channel as you don't have character limitations (you can use forward slash).
Then enter your specifics in config.py:
SERVER_IP: Your Q3 based server IPSERVER_PORT: The port your server listens toBOT_TOKEN: The Discord bot token that you created for thisENABLE_COUNT_CHANNEL: whether you want the player count on a voice channel functionality enabled or not
The following are needed only if you set ENABLE_COUNT_CHANNEL=True
DISCORD_COUNT_CHANNEL_ID: The id of the Discord voice channel that it's name will be changed to show the player countCOUNT_UPDATE_INTERVAL: The interval on which the bot will update the channel in seconds
(right now Discord allows voice channel name change every 5 minutes, so 300 is the minimum possible value for now)
Just run the bot.py script:
python bot.py
or
python3 bot.py
Script logs events to file main.log

