mirror of
https://github.com/AsgardEternal/DiscordWhitelist.git
synced 2024-12-30 15:19:12 -06:00
use name when no nick available
This commit is contained in:
parent
dd9a9a464e
commit
0219ebf8f4
@ -31,7 +31,8 @@ class Whitelist(commands.Cog):
|
|||||||
await interaction.response.send_message("Could not find steamID!")
|
await interaction.response.send_message("Could not find steamID!")
|
||||||
for urole in interaction.user.roles:
|
for urole in interaction.user.roles:
|
||||||
if urole.id in self.client.whitelistGrps.keys():
|
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()
|
self.client.squadjs.commit()
|
||||||
await interaction.response.send_message("SteamID is linked, roles updated.")
|
await interaction.response.send_message("SteamID is linked, roles updated.")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user