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,7 +16,16 @@ namespace DiscordBot.Messages
|
||||||
foreach(ApiRole role in roles)
|
foreach(ApiRole role in roles)
|
||||||
{
|
{
|
||||||
if(allRoles || role.IsSignUpAllowed)
|
if(allRoles || role.IsSignUpAllowed)
|
||||||
signUpSelect.AddOption(role.Name, role.roleId.ToString(), role.Description);
|
{
|
||||||
|
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()
|
var builder = new ComponentBuilder()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue