This creates a Discord bot that you can use to track workouts, and show a leaderboard based on who has tracked the most points.
- Clone the repository
git clone https://github.com/zainhussaini/workout-bot.git
- Create a Discord bot and generate a token at https://discord.com/developers/docs/topics/oauth2. At this step you can also add it to your Discord sever(s).
- Select
bot
in scopes - Select
Send Messages
andRead Message History
in bot permissions
- Select
- Set up redis server
sudo apt install redis
redis-cli
set 'DISCORD_TOKEN' '<insert token here>'
- Install python packages
pip3 install -U discord.py tabulate pandas datetime redis
- Test the program
python3 main.py
- Run the program in background
nohup python3 main.py &
Once you add the bot to the Discord channel, you can log workouts by !point
.
You can check the rankings by !scoreboard
. The users with logged workouts are shown ranked by score.
The full list of commands is found by by !help
.