Skip to content

Commit

Permalink
updated the warn command to also give the owner/mod a chance to ban u…
Browse files Browse the repository at this point in the history
…sers who have already left the server.
  • Loading branch information
Ascensionn committed Dec 5, 2024
1 parent 7e8279c commit 31a54cf
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions redbot/cogs/warnings/warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ async def warn(
member = user
elif isinstance(user, int):
if not ctx.channel.permissions_for(ctx.guild.me).ban_members:
await ctx.send(_("I cannot ban users. Missing the permission to ban members."))
await ctx.send(_("User {user} is not in the server.").format(user=user))
return
user_obj = self.bot.get_user(user) or discord.Object(id=user)

Expand Down Expand Up @@ -427,10 +427,7 @@ async def warn(
else:
confirm.message = await ctx.send(_("No action taken."))

if ctx.channel.permissions_for(ctx.guild.me).add_reactions:
await confirm.message.add_reaction("\N{WHITE HEAVY CHECK MARK}")
else:
await ctx.tick()
ctx.tick()
return

if member == ctx.author:
Expand Down

0 comments on commit 31a54cf

Please sign in to comment.