Merge branch 'master' of https://github.com/Linaith/Lieb-Website
This commit is contained in:
commit
ef1c301c05
2 changed files with 12 additions and 2 deletions
|
@ -16,7 +16,17 @@ namespace DiscordBot.Messages
|
||||||
foreach(ApiRole role in roles)
|
foreach(ApiRole role in roles)
|
||||||
{
|
{
|
||||||
if(role.IsSignUpAllowed)
|
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()
|
var builder = new ComponentBuilder()
|
||||||
|
|
|
@ -110,7 +110,7 @@ namespace Lieb.Data
|
||||||
signUp.RaidRole = randomRole;
|
signUp.RaidRole = randomRole;
|
||||||
}
|
}
|
||||||
|
|
||||||
int noGroups = (int)Math.Ceiling((double)(raid.SignUps.Where(s => s.SignUpType == SignUpType.SignedUp).Count() / 5));
|
int noGroups = (int)Math.Ceiling(raid.SignUps.Where(s => s.SignUpType == SignUpType.SignedUp).Count() / 5.0);
|
||||||
|
|
||||||
HashSet<GuildWars2Account> signedUpAccounts = raid.SignUps.Where(s => s.GuildWars2Account != null && s.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.UseInRandomRaid).Count() > 0
|
HashSet<GuildWars2Account> signedUpAccounts = raid.SignUps.Where(s => s.GuildWars2Account != null && s.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.UseInRandomRaid).Count() > 0
|
||||||
&& s.SignUpType == SignUpType.SignedUp)
|
&& s.SignUpType == SignUpType.SignedUp)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue