Skip to content

Commit

Permalink
fix for edge case in quakewalk
Browse files Browse the repository at this point in the history
  • Loading branch information
DigiDuncan committed Dec 5, 2023
1 parent c427a52 commit cc58521
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sizebot/cogs/quake.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ async def quakewalk(self, ctx, dist: SV, user: typing.Union[discord.Member, Fake
stats = proportions.PersonStats(userdata)
steps: int = int(dist / stats.walksteplength)

if steps < 1:
await ctx.send("You don't even have to take a single step to reach that distance!")
return

small_j = step_joules(userdata)
small_mag = joules_to_mag(small_j)
small_type = mag_to_name(small_mag)
Expand Down

0 comments on commit cc58521

Please sign in to comment.