diff options
| author | 2020-09-21 19:22:25 -0700 | |
|---|---|---|
| committer | 2020-09-21 19:22:25 -0700 | |
| commit | 0fee151b4c0ec96ed49913ef5254eaf86d92cbcb (patch) | |
| tree | ee6496bedfa28a48078fc4dc2c4ce3789e79997c | |
| parent | Replacing the round function with a format specifier. (diff) | |
Replacing the round function with a format specifier.
Co-authored-by: Dennis Pham <[email protected]>
| -rw-r--r-- | bot/exts/utils/ping.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/utils/ping.py b/bot/exts/utils/ping.py index 608b6c22c..e19a2c099 100644 --- a/bot/exts/utils/ping.py +++ b/bot/exts/utils/ping.py @@ -42,7 +42,7 @@ class Latency(commands.Cog): site_ping = f"{Emojis.cross_mark} Connection timed out." # Discord Protocol latency return value is in seconds, must be multiplied by 1000 to get milliseconds. - discord_ping = f"{round(self.bot.latency * 1000, ROUND_LATENCY)} ms" + discord_ping = f"{self.bot.latency * 1000:.{ROUND_LATENCY}f} ms" embed = Embed(title="Pong!") |