From a974472e239d1032feaa5cb7e6260cd8ff8cb035 Mon Sep 17 00:00:00 2001 From: Paillat Date: Sun, 27 Nov 2022 16:35:19 +0100 Subject: [PATCH] Update code.py --- code/code.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/code.py b/code/code.py index a376f49..ca627ca 100644 --- a/code/code.py +++ b/code/code.py @@ -139,6 +139,8 @@ async def on_message(message): #check if the bot hasn't been used more than 200 times in the last 24 hours (uses_count_today) c.execute("SELECT uses_count_today FROM data WHERE guild_id = ?", (message.guild.id,)) if c.fetchone()[0] >= 200: + debug("The bot has been used more than 200 times in the last 24 hours in this guild") + await message.channel.send("The bot has been used more than 200 times in the last 24 hours in this guild. Please try again in 24h.") return #add 1 to the uses_count_today c.execute("UPDATE data SET uses_count_today = uses_count_today + 1 WHERE guild_id = ?", (message.guild.id,))