From 07b952de68a61b5c08ea2d1af2b72c70be3d5ef2 Mon Sep 17 00:00:00 2001 From: Paillat Date: Sat, 10 Dec 2022 02:03:42 +0100 Subject: [PATCH] Update chat.py --- code/cogs/chat.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/cogs/chat.py b/code/cogs/chat.py index c1296a7..e16c4b9 100644 --- a/code/cogs/chat.py +++ b/code/cogs/chat.py @@ -39,11 +39,9 @@ class Chat (discord.Cog) : return #check if the bot hasn't been used more than 5000 times in the last 24 hours (uses_count_today) c.execute("SELECT uses_count_today FROM data WHERE guild_id = ?", (message.guild.id,)) - debug(f"uses_count_today: {c.fetchone()[0]}") - actual_uses = c.fetchone()[0] - if actual_uses >= max_uses: + if c.fetchone()[0] >= 500: debug(f"The bot has been used more than {max_uses} times in the last 24 hours in this guild. Please try again in 24h.") - await message.channel.send(f"The bot has been used more than {max_uses} times in the last 24 hours in this guild. Please try again in 24h.") + await message.channel.send("The bot has been used more than 5000 times in the last 24 hours in this guild. Please try again in 24h.") return #add 1 to the uses_count_today #show that the bot is typing