Mute.py fully works now (i think) i hate inf being too big though

This commit is contained in:
Lilac-Rose
2025-10-10 12:54:53 +02:00
parent d9b2422111
commit d04cb4d5de

View File

@@ -107,6 +107,11 @@ class MuteCommand(ModerationBase):
db_path = os.path.join(os.path.dirname(__file__), "moderation.db")
conn = sqlite3.connect(db_path)
c = conn.cursor()
c.execute("SELECT 1 FROM mutes WHERE user_id = ? AND guild_id = ?", (user_id, guild_id))
exists = c.fetchone()
if not exists:
conn.close()
return
c.execute("DELETE FROM mutes WHERE user_id = ? AND guild_id = ?", (user_id, guild_id))
conn.commit()
conn.close()