Unverified Commit 25b93402 authored by Tulir Asokan's avatar Tulir Asokan Committed by GitHub

Round to seconds when time is over a minute in !ping

parent 373200f4
......@@ -13,6 +13,7 @@ class EchoBot(Plugin):
elif abs(diff) < 60 * 1_000:
return f"{round(diff / 1_000, 1)} seconds"
minutes, seconds = divmod(diff / 1_000, 60)
seconds = round(seconds)
if abs(minutes) < 60:
return f"{minutes} minutes and {seconds} seconds"
hours, minutes = divmod(minutes, 60)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment