forked from Sarah/Lieb-Website
reworkes sign up messages
This commit is contained in:
parent
57d8df1463
commit
03624a5859
9 changed files with 136 additions and 126 deletions
|
@ -69,7 +69,7 @@ namespace DiscordBot.Messages
|
|||
return raid;
|
||||
}
|
||||
|
||||
public Embed CreateRaidMessage(ApiRaid raid)
|
||||
private Embed CreateRaidMessage(ApiRaid raid)
|
||||
{
|
||||
var embed = new EmbedBuilder()
|
||||
{
|
||||
|
@ -124,5 +124,27 @@ namespace DiscordBot.Messages
|
|||
}
|
||||
return rolesString;
|
||||
}
|
||||
|
||||
public static ButtonParameters ParseButtonId(string customId)
|
||||
{
|
||||
ButtonParameters parameters = new ButtonParameters();
|
||||
|
||||
string[] ids = customId.Split('-');
|
||||
if(ids.Length > 0)
|
||||
{
|
||||
parameters.ButtonType = ids[0];
|
||||
}
|
||||
if(ids.Length > 1)
|
||||
{
|
||||
int.TryParse(ids[1],out parameters.RaidId);
|
||||
}
|
||||
return parameters;
|
||||
}
|
||||
|
||||
public class ButtonParameters
|
||||
{
|
||||
public int RaidId;
|
||||
public string ButtonType = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue