diff --git a/code/cogs/chat.py b/code/cogs/chat.py index 1240084..c1296a7 100644 --- a/code/cogs/chat.py +++ b/code/cogs/chat.py @@ -40,7 +40,8 @@ class Chat (discord.Cog) : #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]}") - if int(c.fetchone()[0]) >= max_uses: + actual_uses = c.fetchone()[0] + if actual_uses >= max_uses: 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.") return