Skip to content

Commit

Permalink
fix time in dist?
Browse files Browse the repository at this point in the history
  • Loading branch information
DigiDuncan committed Dec 7, 2023
1 parent 0a47211 commit 8d16d2a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sizebot/cogs/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ async def distance(self, ctx, memberOrHeightorTime: typing.Union[discord.Member,
if isinstance(memberOrHeightorTime, str):
raise errors.InvalidSizeValue(memberOrHeightorTime, "size or time")
elif isinstance(memberOrHeightorTime, TV):
walkpersecond = SV(userdata2.walkperhour / 3600 * userdata2.scale)
walkpersecond = SV(userdata2.walkperhour / 3600) if userdata2.walkperhour else proportions.AVERAGE_WALKPERHOUR / 3600
walkpersecond *= userdata2.scale
memberOrHeightorTime = SV(walkpersecond * memberOrHeightorTime)

if isinstance(memberOrHeightorTime, SV):
Expand All @@ -348,7 +349,7 @@ async def distance(self, ctx, memberOrHeightorTime: typing.Union[discord.Member,

if userdata2.height > userdata1.height:
h = SV(userdata1.height * userdata2.viewscale)
msg = f"To {userdata2.nickname}, {userdata1.height} appears to be **{h:,.3mu}.**"
msg = f"To {userdata2.nickname}, {userdata1.height:,.3mu} appears to be **{h:,.3mu}.**"
await ctx.send(msg)
return

Expand Down

0 comments on commit 8d16d2a

Please sign in to comment.