mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[V3 Mod] Fix wrong reason used for modlog (#1842)
This commit is contained in:
parent
86579068d9
commit
43c7bd48c7
@ -645,7 +645,7 @@ class Mod:
|
|||||||
if not user:
|
if not user:
|
||||||
await ctx.send(_("Couldn't find a user with that ID!"))
|
await ctx.send(_("Couldn't find a user with that ID!"))
|
||||||
return
|
return
|
||||||
reason = get_audit_reason(ctx.author, reason)
|
audit_reason = get_audit_reason(ctx.author, reason)
|
||||||
bans = await guild.bans()
|
bans = await guild.bans()
|
||||||
bans = [be.user for be in bans]
|
bans = [be.user for be in bans]
|
||||||
if user not in bans:
|
if user not in bans:
|
||||||
@ -654,7 +654,7 @@ class Mod:
|
|||||||
queue_entry = (guild.id, user.id)
|
queue_entry = (guild.id, user.id)
|
||||||
self.unban_queue.append(queue_entry)
|
self.unban_queue.append(queue_entry)
|
||||||
try:
|
try:
|
||||||
await guild.unban(user, reason=reason)
|
await guild.unban(user, reason=audit_reason)
|
||||||
except discord.HTTPException:
|
except discord.HTTPException:
|
||||||
self.unban_queue.remove(queue_entry)
|
self.unban_queue.remove(queue_entry)
|
||||||
await ctx.send(_("Something went wrong while attempting to unban that user"))
|
await ctx.send(_("Something went wrong while attempting to unban that user"))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user