fixed debug poilau returning wrong cooldown times

This commit is contained in:
Anselme François 2023-07-27 12:36:39 +00:00
parent 262dbbfc9e
commit 02a0d657e0

View File

@ -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))