fixed a bug in the randomizer noGproup calculation
fixed a bug for signing up external users
This commit is contained in:
parent
32af72a262
commit
2fde020a57
2 changed files with 12 additions and 2 deletions
|
@ -16,7 +16,17 @@ namespace DiscordBot.Messages
|
|||
foreach(ApiRole role in roles)
|
||||
{
|
||||
if(role.IsSignUpAllowed)
|
||||
signUpSelect.AddOption(role.Name, role.roleId.ToString(), role.Description);
|
||||
{
|
||||
if(!string.IsNullOrEmpty(role.Description))
|
||||
{
|
||||
string description = role.Description.Length <= 100 ? role.Description : role.Description.Substring(0, 100);
|
||||
signUpSelect.AddOption(role.Name, role.roleId.ToString(), description);
|
||||
}
|
||||
else
|
||||
{
|
||||
signUpSelect.AddOption(role.Name, role.roleId.ToString(), role.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var builder = new ComponentBuilder()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue