mirror of
https://github.com/Paillat-dev/Botator.git
synced 2026-01-02 17:24:55 +00:00
Update chat.py
This commit is contained in:
@@ -40,7 +40,7 @@ class Chat (discord.Cog) :
|
|||||||
#check if the bot hasn't been used more than 5000 times in the last 24 hours (uses_count_today)
|
#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,))
|
c.execute("SELECT uses_count_today FROM data WHERE guild_id = ?", (message.guild.id,))
|
||||||
if c.fetchone()[0] >= max_uses:
|
if c.fetchone()[0] >= max_uses:
|
||||||
debug("The bot has been used more than 4000 times in the last 24 hours in this guild")
|
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("The bot has been used more than 5000 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
|
return
|
||||||
#add 1 to the uses_count_today
|
#add 1 to the uses_count_today
|
||||||
|
|||||||
Reference in New Issue
Block a user