fix incorrect ctx.target -> target
This commit is contained in:
parent
5642033442
commit
8726916c50
1 changed files with 3 additions and 6 deletions
|
@ -421,15 +421,12 @@ class Notifications(Cog):
|
||||||
"""
|
"""
|
||||||
await ctx.message.delete(delay=0) # Delete invoking message if able to
|
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):
|
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")
|
await ctx.author.send(f"Target {target} already blocked")
|
||||||
return
|
return
|
||||||
|
|
||||||
await ctx.bot.db.execute(
|
await ctx.bot.db.execute("INSERT INTO user_blocks VALUES(?, ?)", params)
|
||||||
"INSERT INTO user_blocks VALUES(?, ?)",
|
|
||||||
(ctx.author.id, target.id),
|
|
||||||
)
|
|
||||||
await ctx.bot.db.commit()
|
await ctx.bot.db.commit()
|
||||||
await ctx.author.send(f"Blocked {target}")
|
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
|
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):
|
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")
|
await ctx.author.send(f"Target {target} already blocked")
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue