A simple Discord bot that retrieves the server status for Nitrado gameservers and updates a Discord channel with the status.
Use the package manager pip to install requirements.txt
pip3 install --target ./package -r requirements.txt
PYTHONPATH="PATH_TO_PACKAGE_FOLDER:$PYTHONPATH"
export PYTHONPATH
Create copy of "nitrapi_account_config_template.json" as "nitrapi_account_config.json". Then add the auth_tokens for each of the Nitrado accounts into the config.
Create a copy of ".env_template" as ".env". Add the values for: DISCORD_TOKEN, DISCORD_GUILD, and DISCORD_CHANNEL
Make sure to uncomment the last line in bot.py to run locally.
python3 bot.py
cd project_root
cd ./package
zip -r9 ${OLDPWD}/nitrado-ark-status-bot.zip .
cd ..
zip -g nitrado-ark-status-bot.zip bot.py
zip -g nitrado-ark-status-bot.zip nitrapi_account_config.json
aws lambda update-function-code --function-name nitrado-ark-status-bot --zip-file fileb://nitrado-ark-status-bot.zip
- Player counts are not always returned by NitrAPI
Pull requests are welcome to the master branch. For major changes, please open an issue first to discuss what you would like to change.