mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[Mod] Remove error when unbanning an unknown user (#2619)
Fix for #2542
This commit is contained in:
parent
59115cd1c7
commit
7e49ce9a7b
@ -508,8 +508,9 @@ class KickBanMixin(MixinMeta):
|
|||||||
click the user and select 'Copy ID'."""
|
click the user and select 'Copy ID'."""
|
||||||
guild = ctx.guild
|
guild = ctx.guild
|
||||||
author = ctx.author
|
author = ctx.author
|
||||||
user = await self.bot.fetch_user(user_id)
|
try:
|
||||||
if not user:
|
user = await self.bot.fetch_user(user_id)
|
||||||
|
except discord.errors.NotFound:
|
||||||
await ctx.send(_("Couldn't find a user with that ID!"))
|
await ctx.send(_("Couldn't find a user with that ID!"))
|
||||||
return
|
return
|
||||||
audit_reason = get_audit_reason(ctx.author, reason)
|
audit_reason = get_audit_reason(ctx.author, reason)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user