everyone who is allowed do use slash commands can now sign up users ignoring the raid requirements
This commit is contained in:
parent
9c6386e137
commit
de351e167c
2 changed files with 8 additions and 11 deletions
|
@ -76,7 +76,7 @@ namespace DiscordBot.CommandHandlers
|
||||||
|
|
||||||
public async Task SelectRole(SocketInteraction component, int raidId, string buttonType, bool allRoles, ulong userIdToSignUp, ulong signedUpByUserId)
|
public async Task SelectRole(SocketInteraction component, int raidId, string buttonType, bool allRoles, ulong userIdToSignUp, ulong signedUpByUserId)
|
||||||
{
|
{
|
||||||
if(await IsRaidSignUpAllowed(component, raidId, buttonType))
|
if(signedUpByUserId != 0 || await IsRaidSignUpAllowed(component, raidId, buttonType))
|
||||||
{
|
{
|
||||||
List<ApiRole> roles = new List<ApiRole>();
|
List<ApiRole> roles = new List<ApiRole>();
|
||||||
roles = await _httpService.GetRoles(raidId, userIdToSignUp);
|
roles = await _httpService.GetRoles(raidId, userIdToSignUp);
|
||||||
|
|
|
@ -115,8 +115,6 @@ namespace DiscordBot.CommandHandlers
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task SignUpExternalUser(SocketSlashCommand command, int raidId)
|
private async Task SignUpExternalUser(SocketSlashCommand command, int raidId)
|
||||||
{
|
|
||||||
if(await _handlerFunctions.IsRaidSignUpAllowed(command, raidId, Constants.ComponentIds.SIGN_UP_BUTTON))
|
|
||||||
{
|
{
|
||||||
List<ApiRole> roles = await _httpService.GetRoles(raidId, uint.MaxValue);
|
List<ApiRole> roles = await _httpService.GetRoles(raidId, uint.MaxValue);
|
||||||
Tuple<bool, string> signUpAllowed = await _httpService.IsExternalSignUpAllowed(raidId);
|
Tuple<bool, string> signUpAllowed = await _httpService.IsExternalSignUpAllowed(raidId);
|
||||||
|
@ -127,7 +125,6 @@ namespace DiscordBot.CommandHandlers
|
||||||
}
|
}
|
||||||
await command.RespondAsync("Please choose a role.", components: ExternalRoleSelectionMessage.buildMessage(roles, raidId) , ephemeral: true);
|
await command.RespondAsync("Please choose a role.", components: ExternalRoleSelectionMessage.buildMessage(roles, raidId) , ephemeral: true);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private async Task SendMessages(string message, int raidId)
|
private async Task SendMessages(string message, int raidId)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue