diff --git a/.env.example b/.env.example index 4e04086..e412f75 100644 --- a/.env.example +++ b/.env.example @@ -12,3 +12,5 @@ SQUATS=5 LUNGES=2 RUSSIAN_TWISTS=3 WALL_PUSHUPS=5 +BIRD_DOG=4 +HIP_THRUSTS=5 \ No newline at end of file diff --git a/commands.py b/commands.py index 21ba33a..88e02a9 100644 --- a/commands.py +++ b/commands.py @@ -246,7 +246,7 @@ def register(tree: app_commands.CommandTree): @tree.command(name="workout", description="Get a random workout") async def workout(interaction: discord.Interaction): enabled = [w for w, v in WORKOUTS.items() if v > 0] - choice = random.choice(enabled) + choice = random.SystemRandom().choice(enabled) await interaction.response.send_message( f"💪 **{choice}**\n" diff --git a/constants.py b/constants.py index 8161965..8a4229a 100644 --- a/constants.py +++ b/constants.py @@ -28,6 +28,8 @@ WORKOUTS = { "Lunges": env_int("LUNGES"), "Russian Twists": env_int("RUSSIAN_TWISTS"), "Wall Pushups": env_int("WALL_PUSHUPS"), + "Bird Dog": env_int("BIRD_DOG"), + "Hip Thrusts": env_int("HIP_THRUSTS"), } WORKOUT_CALORIES = { @@ -38,6 +40,8 @@ WORKOUT_CALORIES = { "Lunges": 0.2, "Russian Twists": 0.2, "Wall Pushups": 0.1, + "Bird Dog": 0.1, + "Hip Thrusts": 0.5, } ENABLED_WORKOUTS = {