added needed rights for slash commands
added functions for account select in the bot
This commit is contained in:
parent
62bacb5ad7
commit
dc2563e16c
11 changed files with 876 additions and 13 deletions
|
@ -118,14 +118,7 @@
|
|||
{
|
||||
if (_user != null)
|
||||
{
|
||||
if (_raid.RaidType == RaidType.Planned)
|
||||
{
|
||||
_usableAccounts = _user.GuildWars2Accounts.ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
_usableAccounts = _user.GuildWars2Accounts.Where(a => a.EquippedBuilds.Count > 0).ToList();
|
||||
}
|
||||
_usableAccounts = UserService.GetAllUsableAccounts(_user.Id, _raid.RaidType);
|
||||
_liebUserId = _user.Id;
|
||||
}
|
||||
_expandableRoles = new List<ExpandableRole>();
|
||||
|
@ -147,6 +140,10 @@
|
|||
else
|
||||
{
|
||||
int gw2AccountId = UserService.GetMainAccount(_liebUserId).GuildWars2AccountId;
|
||||
if(!_usableAccounts.Where(a => a.GuildWars2AccountId == gw2AccountId).Any())
|
||||
{
|
||||
gw2AccountId = _usableAccounts.FirstOrDefault().GuildWars2AccountId;
|
||||
}
|
||||
await RaidService.SignUp(_raid.RaidId, _liebUserId, gw2AccountId, role.RaidRoleId, signUpType);
|
||||
}
|
||||
_Parent.HasChanged();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue