From 0219ebf8f407fca881d60c07f7fdc9fcc9eeefbf Mon Sep 17 00:00:00 2001 From: Skillet Date: Mon, 17 Apr 2023 22:18:38 -0400 Subject: [PATCH] use name when no nick available --- autowl/Cogs/Whitelist.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autowl/Cogs/Whitelist.py b/autowl/Cogs/Whitelist.py index 6e204b1..9bae241 100644 --- a/autowl/Cogs/Whitelist.py +++ b/autowl/Cogs/Whitelist.py @@ -31,7 +31,8 @@ class Whitelist(commands.Cog): await interaction.response.send_message("Could not find steamID!") for urole in interaction.user.roles: if urole.id in self.client.whitelistGrps.keys(): - self.client.whitelistGrps[urole.id].addMember(config.WhitelistMember(interaction.user.id, interaction.user.nick, steam64)) + disusername = interaction.user.nick if interaction.user.nick is not None else interaction.user.name + self.client.whitelistGrps[urole.id].addMember(config.WhitelistMember(interaction.user.id, disusername, steam64)) self.client.squadjs.commit() await interaction.response.send_message("SteamID is linked, roles updated.")