From d04cb4d5debdd56b28718de6dd3f267934eb41ae Mon Sep 17 00:00:00 2001 From: Lilac-Rose Date: Fri, 10 Oct 2025 12:54:53 +0200 Subject: [PATCH] Mute.py fully works now (i think) i hate inf being too big though --- moderation/mute.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/moderation/mute.py b/moderation/mute.py index e3e987e..6d0b4ef 100644 --- a/moderation/mute.py +++ b/moderation/mute.py @@ -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()