fix incorrect ctx.target -> target

This commit is contained in:
Infinidoge 2025-01-02 10:55:18 -05:00
parent 5642033442
commit 8726916c50
Signed by: Infinidoge
SSH key fingerprint: SHA256:GT2StvPQMMfFHyiiFJymQxfTG/z6EWLJ6NWItf5K5sA

View file

@ -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