This commit is contained in:
AllfatherHatt 2026-02-04 18:23:41 +01:00
commit f22f1d46d1

View File

@ -41,12 +41,11 @@ class FitnessCog(commands.Cog):
if not content.startswith("!"):
return
cmdline = content[1:].strip()
cmdline = content[1:].strip().lower()
if not cmdline:
return
cmd, *rest = cmdline.split(" ", 1)
cmd = cmd.lower()
arg = rest[0].strip() if rest else ""
if cmd == "getunits":
@ -104,11 +103,11 @@ class FitnessCog(commands.Cog):
parts = message.content[1:].strip().split()
if len(parts) < 2:
await message.reply(
"Usage: `!<activity> <value> [unit]` (example: `!pushups 20 reps`)"
"Usage: `!<activity> <value> [unit]` (example: `!pushups 20` or `!run 5 km`)"
)
return
activity = parts[0].lower()
activity = parts[0]
try:
value = float(parts[1])
@ -118,7 +117,7 @@ class FitnessCog(commands.Cog):
)
return
unit = parts[2].lower() if len(parts) > 2 else "m"
unit = parts[2] if len(parts) > 2 else "m"
timestamp = int(message.created_at.timestamp())
username = message.author.name