Skip to content

Commit

Permalink
Fix returned username being None
Browse files Browse the repository at this point in the history
  • Loading branch information
MattBSG committed Jun 30, 2024
1 parent b7c2788 commit 0a506b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/moderation.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ async def _banning(

member = interaction.guild.get_member(user)
userid = user
username = userid if (type(member) is int) else str(member)
username = userid if (type(member) is int) or not member else str(member)

# If not a user, manually contruct a user object
user = discord.Object(id=userid) if (type(user) is int) else user
Expand Down

0 comments on commit 0a506b5

Please sign in to comment.