mirror of
https://github.com/Lilac-Rose/Lacie.git
synced 2026-08-22 08:45:22 -05:00
Mute.py fully works now (i think) i hate inf being too big though
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user