Skip to content

jordybronowicki37/befit-bot

Repository files navigation

Newest Release Newest Version GitHub Profile Docker image Download count

██████╗ ███████╗███████╗██╗████████╗   ██████╗  ██████╗ ████████╗
██╔══██╗██╔════╝██╔════╝██║╚══██╔══╝   ██╔══██╗██╔═══██╗╚══██╔══╝
██████╔╝█████╗  █████╗  ██║   ██║█████╗██████╔╝██║   ██║   ██║   
██╔══██╗██╔══╝  ██╔══╝  ██║   ██║╚════╝██╔══██╗██║   ██║   ██║   
██████╔╝███████╗██║     ██║   ██║      ██████╔╝╚██████╔╝   ██║   
╚═════╝ ╚══════╝╚═╝     ╚═╝   ╚═╝      ╚═════╝  ╚═════╝    ╚═╝   

BeFit gains tracker

This cool bot can help you with improving your fitness. It can track your progress, motivate you, manage your goals and compare your progress to others.

Discord

All commands are globally accessible for all user, except for the management commands. I have categorized these within specific features or domains so that you can see relevant commands grouped together. Click the arrow left of the command to expand and view more information.

User commands

These commands are applicable to the entire user's data.

User stats

With this command you can see your own stats or optionally see the stats of one of your friends.

Format: /stats ?{user-id}
Example:
Stats command response example

Achievements

With this command you can view all of your earned and locked achievements. It can also display the completion percentage of the entire community.

Format: /achievements
Example:
All exercises command response example

Leaderboard

With this command you can view the global leaderboard. This leaderboard is based on the users total xp.

Format: /leaderboard
Example:
Leaderboard command response example

Exercises commands

Exercises are the different types of thinks that you want to measure. It could be something related to strength, endurance, cardio, body measurements, and more. So it is not limited to just activities, you could also for example keep track of your weight. A log of an exercise is the actual measurement for the exercise and this might be the most important command.

Log an exercise

With this command you can create a log of an exercise. In the response you can see multiple personal statistics of the exercise, get congratulations on your reached result, see your reached achievements, view the received amount of experience and finally get some motivation. This is perhaps the most important, used and complex command of the bot.

Format: /log {exercise} {amount}
Example:
Log command response example

Log history

With this command you can see your entire log history or filter it by an exercise.

Format: /history {exercise}
Example:
History command response example

Create a new exercise

With this command you can create new exercises so that you can track your progress on all of your favorite exercises. Go to measurement-types and goal-direction to see the available options.

Format: /exercises create {name} {measurement-type} {goal-direction}
Example:
Create exercise command response example

View all exercises

With this command you van view all available exercises. The extended data will also show how many people are participating and who is in first place.

Format: /exercises view all
Example:
All exercises command response example

View the exercises you are participating in

With this command you can view all the exercises you are participating in. The extended data will show the amount of logs you've made, the goal if you have added any, your personal record and your place in the leaderboard.

Format: /exercises view my
Example:
My exercises command response example

View extended data of one specific exercise

With this command you can view extended data on a single exercise. It can show global information and statistics, your personal statistics and also a larger leaderboard.

Format: /exercises view one {exercise}
Example:
One exercise command response example

Renaming an exercise

With this command you can rename an exercise.

Format: /exercises rename {exercise} {new-name}

Goals commands

Goals are target values for specific exercises. You can set a goal for an exercise that you would like to improve. Then bot can then help you achieve this goal by motivating you and helping you reach this new peak.

Create a new goal

With this command you can set a goal for a specific exercise to work towards. See goal-status for all possible statuses.

Format: /goals add {exercise} {amount}
Example:
Create goal command response example

Cancel an existing goal

With this command you can cancel a goal. This will update the goal's status to CANCELLED. See goal-status for all possible statuses.

Format: /goals cancel {goal}
Example:
Goal cancel command response example

View all your goals

With this command you can view all of your active goals. See goal-status for all possible statuses.

Format: /goals view
Example:
View goals command response example

Sessions commands

Sessions are basically collections of logs. You can start a sessions whenever you start a workout. Every log created after will be automatically added to the session. Afterward you can view a summary of your workout.

Create session

With this command you can create a session. With a session, you can group sequential logs and get an overview of your entire workout. A session will get automatically finished when there is no log created for at least an hour. See session-status for the possible states that a session can be in.

Format: /sessions create {name}
Example:
Session create command response example

View all sessions

With this command you can see all of your created sessions. See session-status for the possible states that a session can be in.

Format: /sessions view all
Example:
Session view all command response example

View your last session

With this command you can view more expanded data on your last session. See session-status for the possible states that a session can be in.

Format: /sessions view last
Example:
Session view last command response example

View extended data of one specific session

With this command you can view more expanded data on a specific session. See session-status for the possible states that a session can be in.

Format: /sessions view one {session}
Example:
Session view one command response example

Stop session

With this command you can manually stop a session. This will update the session's status to STOPPED. See session-status for the possible states that a session can be in.

Format: /sessions stop {session}
Example:
Session stop command response example

Rate session

When a session is manually or automatically stopped, then the user is sent a message to rate their session.

Note: this is not really a command, instead it is automatically being sent to you via the channel you originally created the session.
Example:
Session Rate command response example

Habits commands

Habits are personal behaviours that you want to train yourself into following. This can be anything like adding specific routines to your day, keeping track of your diet or the execution of specific repeating tasks. You have three types of habits: Daily, Weekly and Monthly. The bot will automatically ask if you have reached these habits on either the end of the day, week or month respectively. You can then check off the habits that you have reached/completed in the specified period. So for daily habits you will be asked at the end of the day if you have completed the habits that you wanted to complete. You can check the completed habits by pressing the red cross and transforming it into a green checkmark.

Create a new habit

Use this command to create a new habit. See habit time-ranges for all the possible options.

Format: /habits create {name} {time-range}
Example:
Habit create command response example

Check off a habit

This action will ask you what habit you have completed in the past time-range. The daily habits will be asked every day, the weekly habits will be asked each sunday and the monthly habits will be asked on the last day of the month.

Note: this is not really a command, instead it is automatically being sent to you via a private channel.
Example:
Habit check command response example

View all your habits

Use this command to view all your habits, optionally you can filter on a specific time-range. See habit time-ranges for all the possible options.

Format: /habits view all ?{time-range}
Example:
Habit view all command response example

View extended data of one specific habit

Use this command to get a detailed view of one of your habits.

Format: /habits view one {habit}
Example:
Habit view one command response example

View your progress on a habit

Use this command to generate a chart of your logged habits.

Format: /habits progress {time-range}
Example:
Habit daily progress command response example

Remove one of your habits

Use this command to remove one of your habits.

Format: /habits remove {habit}

Miscellaneous commands

Help

Use this command to get an overview of the most common and useful commands. You also get some information of the bot. Optionally you can also get more information on a specific command.

Format: /help ?{command}
Example:
Help command response example

Retrieve a motivational quote

With this command you can receive a random motivational quote.

Format: /motivation
Example:
Motivation command response example

Management Commands

These commands are only available from the configured management server. It is advisable to create a separate server as a management server so that these management commands will only be visible to the maintainer. Besides this the bot needs some free space for the custom emoji's that are used for the achievement icons, and to not fill your personal server with these visuals, it is advisable to create this separate server.

Restart server

With this command you can as a maintainer restart the server on demand.

Format: /management restart

Refresh guild commands

With this command you can as a maintainer register the discord commands. This is useful if some commands are not working properly or are missing on a server.

Format: /management refresh

Add scheduled job

With this command you can as a maintainer add a scheduled job. These jobs are scheduled on a cron-expression basis. Optionally you can give a timezone-id, defaults to UTC. See job-types to view all the available types of jobs.

Format: /management jobs add {channel-id} {job-type} {cron-expression} ?{timezone-id}

Remove scheduled job

With this command you can as a maintainer remove a scheduled job.

Format: /management jobs remove {scheduled-job}

Options and statuses

Goal directions

  • Increasing
  • Decreasing

Goal status

  • Active
  • Cancelled (manually)
  • Overwritten (when a goal with the same exercise is created)
  • Completed

Habit time ranges

  • Daily
  • Weekly
  • Monthly

Job types

  • Gym reminder (sends a reminder to go to the gym)
  • Motivational message (sends a motivational message)

Measurement types

  • Kilograms
  • Grams
  • Kilometers
  • Meters
  • Centimeters
  • Kilometers per hour
  • Times
  • Hours
  • Minutes
  • Seconds
  • Calories
  • Beats per minute
  • Percentage

Session status

  • Active
  • Overwritten (when a new session is started if one is still active)
  • Stopped (manually)
  • Finished (automatically)

Achievements

There are 20 achievements for you to complete. Each increasing in difficulty. Are you the one to complete them all?

Achievements

Achievements

Icon Title Description Difficulty
Achievement icon Heart monitor Log an exercise which uses bpm as a measurement. EASY
Achievement icon Let's get healthy Create your first log. EASY
Achievement icon Reach your potential Complete a goal. EASY
Achievement icon Cardio enthusiast Do any exercise for 30 minutes. MEDIUM
Achievement icon Done for today Create 10 logs on a single day. MEDIUM
Achievement icon Full workout Within 24h, log an exercise for the following categories: weight, time and distance. MEDIUM
Achievement icon Keep on stacking Have 5 concurrent logs of a single exercise that keep increasing. MEDIUM
Achievement icon Love to lift Lift something weighing more than 50kg for 3 days in a row. MEDIUM
Achievement icon On a roll Log an exercise 4 days in a row. MEDIUM
Achievement icon On the bench Add 5 logs to a single session. MEDIUM
Achievement icon The right mindset Set 5 goals and complete these within a month. MEDIUM
Achievement icon Think about your health Log an exercise that burns 200 calories. MEDIUM
Achievement icon Feels like home Log an exercise 10 days in a row. HARD
Achievement icon Let's go places Reach a distance of 20km. HARD
Achievement icon Show off Reach the first place on an exercise leaderboard that has at least 6 participants. HARD
Achievement icon The goat Create a total of 100 logs. HARD
Achievement icon The hulk Lift something weighing more than 100kg. HARD
Achievement icon Bodybuilder Add 10 logs to a single session. IMPOSSIBLE
Achievement icon Like a marathon Reach a distance of 42km. IMPOSSIBLE
Achievement icon Serious dedication Create at least one log each day for an entire month. IMPOSSIBLE

Deployment

Follow the instructions as mentioned in the how-to.

Domain

See the domain model to view all the entities and their relationships. There might be inconsistencies between the domain model and the actual situation! Domain model

About

A discord bot that tracks your gym or fitness progress and also motivates you.

Topics

Resources

Stars

Watchers

Forks

Packages