zainhussaini / workout-bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

workout-bot

This creates a Discord bot that you can use to track workouts, and show a leaderboard based on who has tracked the most points.

Setup

  1. Clone the repository
git clone https://github.com/zainhussaini/workout-bot.git
  1. 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).
    1. Select bot in scopes
    2. Select Send Messages and Read Message History in bot permissions
  2. Set up redis server
sudo apt install redis
redis-cli
set 'DISCORD_TOKEN' '<insert token here>'
  1. Install python packages
pip3 install -U discord.py tabulate pandas datetime redis
  1. Test the program
python3 main.py
  1. Run the program in background
nohup python3 main.py &

Usage

Once you add the bot to the Discord channel, you can log workouts by !point.

Screenshot 2023-12-12 at 1 00 15 AM

You can check the rankings by !scoreboard. The users with logged workouts are shown ranked by score.

Screenshot 2023-12-12 at 1 00 15 AM

The full list of commands is found by by !help.

image

About

License:MIT License


Languages

Language:Python 100.0%