From 8726916c502b98f0fab2b075685a0af206209a25 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Thu, 2 Jan 2025 10:55:18 -0500 Subject: [PATCH] fix incorrect ctx.target -> target --- nomen/notifications.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/nomen/notifications.py b/nomen/notifications.py index 10b822b..970f5ca 100644 --- a/nomen/notifications.py +++ b/nomen/notifications.py @@ -421,15 +421,12 @@ class Notifications(Cog): """ await ctx.message.delete(delay=0) # Delete invoking message if able to - params = (ctx.author.id, ctx.target.id) + params = (ctx.author.id, target.id) if await ctx.bot.db.fetch_exists("SELECT * FROM user_blocks WHERE user_id=? AND target=?", params): await ctx.author.send(f"Target {target} already blocked") return - await ctx.bot.db.execute( - "INSERT INTO user_blocks VALUES(?, ?)", - (ctx.author.id, target.id), - ) + await ctx.bot.db.execute("INSERT INTO user_blocks VALUES(?, ?)", params) await ctx.bot.db.commit() await ctx.author.send(f"Blocked {target}") @@ -443,7 +440,7 @@ class Notifications(Cog): await ctx.message.delete(delay=0) # Delete invoking message if able to - params = (ctx.author.id, ctx.target.id) + params = (ctx.author.id, target.id) if await ctx.bot.db.fetch_exists("SELECT * FROM user_blocks WHERE user_id=? AND target=?", params): await ctx.author.send(f"Target {target} already blocked") return