fixrd prolem if role description is empty
This commit is contained in:
parent
a438f1eeb4
commit
de58541d0b
1 changed files with 10 additions and 1 deletions
|
@ -16,8 +16,17 @@ namespace DiscordBot.Messages
|
|||
foreach(ApiRole role in roles)
|
||||
{
|
||||
if(allRoles || role.IsSignUpAllowed)
|
||||
{
|
||||
if(!string.IsNullOrEmpty(role.Description))
|
||||
{
|
||||
signUpSelect.AddOption(role.Name, role.roleId.ToString(), role.Description);
|
||||
}
|
||||
else
|
||||
{
|
||||
signUpSelect.AddOption(role.Name, role.roleId.ToString(), role.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var builder = new ComponentBuilder()
|
||||
.WithSelectMenu(signUpSelect, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue