Attempting to be a bit more direct about activity path #15
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "debug_fitness"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -59,0 +105,4 @@parts = message.content[1:].strip().split()if len(parts) < 2:await message.reply("Usage: `!<activity> <value> [unit]` (example: `!pushups 20 reps`)"Activity "Pushups" specifically consists of
So "reps" part may be omitted,
!pushups 20will work the same.@ -14,1 +22,4 @@self.threads_id.append(int(x))self.confirm_reactions = os.getenv("CONFIRMATION_REACTIONS", "🐈💨")self.bundled_activities_dir: Path = bundled_data_path(self) / "activities"^this should be used instead for path joiningNvm, I didn't realized it's the Path lib thing.
@ -30,1 +48,3 @@await self.get_log_file(message)cmd, *rest = cmdline.split(" ", 1)cmd = cmd.lower()Maybe put entire
cmdlinevalue to.lowerinstead?@ -44,0 +68,4 @@)returnactivity = activity.lower()if
cmdline = cmdline.lower()on line 48, then this.lowerwill become redundant@ -53,0 +88,4 @@)returnactivity = activity.lower()if
cmdline = cmdline.lower()on line 48, then this.lowerwill become redundant@ -59,0 +109,4 @@)returnactivity = parts[0].lower()if
cmdline = cmdline.lower()on line 48, then this.lowerwill become redundant@ -59,0 +119,4 @@)returnunit = parts[2].lower() if len(parts) > 2 else "m"if
cmdline = cmdline.lower()on line 48, then this.lowerwill become redundantAlso, should probably put default unit in units' json file with falling back to "m", now that I think of it...