From 02a0d657e0b563ebfefeea8f5584d6690a8009a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anselme=20Fran=C3=A7ois?= Date: Thu, 27 Jul 2023 12:36:39 +0000 Subject: [PATCH] fixed debug poilau returning wrong cooldown times --- modules/rhymes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/rhymes.py b/modules/rhymes.py index 60250ff..a77f86d 100644 --- a/modules/rhymes.py +++ b/modules/rhymes.py @@ -69,7 +69,7 @@ class RhymesModule(BaseModule): dump = {} for key, value in self.guild_config.items(): channel_name = await self.get_guild_name(key) - sleeping_time = "{:.2f} s".format(min(0, value["cooldown"] - time.time())) + sleeping_time = "{:.2f} s".format(max(0, value["cooldown"] - time.time())) dump[channel_name] = {"cooldown": sleeping_time, "self-control": value["self-control"]} await message.author.send( "```json\n{0}```".format(json.dumps(dump, ensure_ascii=False, indent=4))