From 0a506b54200c7c0d7f0e5a57f0b2a27cc89791f8 Mon Sep 17 00:00:00 2001 From: Matthew Cohen Date: Sun, 30 Jun 2024 17:49:40 -0400 Subject: [PATCH] Fix returned username being None --- modules/moderation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/moderation.py b/modules/moderation.py index ed27250..341bf49 100644 --- a/modules/moderation.py +++ b/modules/moderation.py @@ -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