added try catch to avoid discord error message if renaming user is not possible
This commit is contained in:
parent
26dd595057
commit
104b938afc
1 changed files with 9 additions and 5 deletions
|
@ -57,6 +57,8 @@ namespace DiscordBot.CommandHandlers
|
|||
{
|
||||
string nickname = $"{name} | {account}";
|
||||
foreach(ulong serverId in serverList)
|
||||
{
|
||||
try
|
||||
{
|
||||
SocketGuild guild = client.Guilds.FirstOrDefault(g => g.Id == serverId);
|
||||
if(guild != null)
|
||||
|
@ -68,6 +70,8 @@ namespace DiscordBot.CommandHandlers
|
|||
}
|
||||
}
|
||||
}
|
||||
catch {}
|
||||
}
|
||||
}
|
||||
|
||||
public async Task SelectRole(SocketInteraction component, int raidId, string buttonType, bool allRoles, ulong userIdToSignUp, ulong signedUpByUserId)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue