Skip to content

Commit

Permalink
♻️ refactor(ban): better check
Browse files Browse the repository at this point in the history
  • Loading branch information
ascpial committed Mar 11, 2023
1 parent f6b3581 commit a8efc0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/ban/ban.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ async def fake_ban(
show_error: whether to show an error message if the ban fails
"""

try:
if isinstance(ctx.channel, discord.Thread):
channel = ctx.channel.parent
except AttributeError:
else:
channel = ctx.channel

# send the invitation to allow the user to rejoin the guild
Expand Down

0 comments on commit a8efc0f

Please sign in to comment.