reworked sign up workflow
This commit is contained in:
parent
2a9cd89783
commit
19595e52bf
4 changed files with 51 additions and 20 deletions
|
@ -8,7 +8,7 @@ namespace DiscordBot.Messages
|
|||
public static MessageComponent buildMessage(List<ApiRole> roles, int raidId, string buttonType, bool allRoles, ulong userIdToSignUp, ulong signedUpByUserId)
|
||||
{
|
||||
var signUpSelect = new SelectMenuBuilder()
|
||||
.WithPlaceholder($"Select a role")
|
||||
.WithPlaceholder($"Select a role - {GetButtonName(buttonType)}")
|
||||
.WithCustomId($"{Constants.ComponentIds.ROLE_SELECT_DROP_DOWN}-{raidId}-{buttonType}-{userIdToSignUp}-{signedUpByUserId}")
|
||||
.WithMinValues(1)
|
||||
.WithMaxValues(1);
|
||||
|
@ -25,6 +25,28 @@ namespace DiscordBot.Messages
|
|||
return builder.Build();
|
||||
}
|
||||
|
||||
private static string GetButtonName(string buttonType)
|
||||
{
|
||||
switch(buttonType)
|
||||
{
|
||||
case Constants.ComponentIds.SIGN_UP_BUTTON:
|
||||
return "Sign Up";
|
||||
break;
|
||||
case Constants.ComponentIds.MAYBE_BUTTON:
|
||||
return "Maybe";
|
||||
break;
|
||||
case Constants.ComponentIds.BACKUP_BUTTON:
|
||||
return "Backup";
|
||||
break;
|
||||
case Constants.ComponentIds.FLEX_BUTTON:
|
||||
return "Flex";
|
||||
break;
|
||||
default:
|
||||
return string.Empty;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public static Parameters ParseId(string customId)
|
||||
{
|
||||
Parameters parameters = new Parameters();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue