Skip to content

Commit

Permalink
Update redbot/cogs/warnings/warnings.py
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Oliveira <[email protected]>
  • Loading branch information
Ascensionn and Flame442 authored Dec 2, 2024
1 parent 7e7d624 commit c5a41a9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions redbot/cogs/warnings/warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,9 @@ async def warn(
if isinstance(user, discord.Member):
member = user
elif isinstance(user, int):
if not ctx.channel.permissions_for(ctx.guild.me).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)
try:
confirm = ConfirmView(ctx.author, timeout=10)
Expand Down

0 comments on commit c5a41a9

Please sign in to comment.