properly unwrap query for disabled

This commit is contained in:
Infinidoge 2024-12-20 01:14:34 -05:00
parent f027f8c462
commit 57bf820501
Signed by: Infinidoge
SSH key fingerprint: SHA256:GT2StvPQMMfFHyiiFJymQxfTG/z6EWLJ6NWItf5K5sA

View file

@ -54,9 +54,9 @@ async def handle_triggers(ctx, message):
disabled = await ctx.bot.db.execute_fetchall( disabled = await ctx.bot.db.execute_fetchall(
"SELECT EXISTS(SELECT * FROM users WHERE user_id=:author AND disabled IS 1)", params "SELECT EXISTS(SELECT * FROM users WHERE user_id=:author AND disabled IS 1)", params
)[0] )
if disabled: if disabled[0][0]:
log.debug(f"User {ctx.author} ({ctx.author.id}) opted out") log.debug(f"User {ctx.author} ({ctx.author.id}) opted out")
return return