|
|
@@ -17,7 +17,7 @@ public class CommandBuilderTests |
|
|
|
ApplicationCommandOptionType.String, |
|
|
|
"option1 description", |
|
|
|
isRequired: true, |
|
|
|
choices: new [] |
|
|
|
choices: new [] |
|
|
|
{ |
|
|
|
new ApplicationCommandOptionChoiceProperties() |
|
|
|
{ |
|
|
@@ -34,4 +34,22 @@ public class CommandBuilderTests |
|
|
|
.AddChoice("choice2", "2")); |
|
|
|
command.Build(); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void BuildSubSlashCommand() |
|
|
|
{ |
|
|
|
var command = new SlashCommandBuilder() |
|
|
|
.WithName("command").WithDescription("Command desc.") |
|
|
|
.AddOptions(new SlashCommandOptionBuilder() |
|
|
|
.WithType(ApplicationCommandOptionType.SubCommand) |
|
|
|
.WithName("subcommand").WithDescription("Subcommand desc.") |
|
|
|
.AddOptions( |
|
|
|
new SlashCommandOptionBuilder() |
|
|
|
.WithType(ApplicationCommandOptionType.String) |
|
|
|
.WithName("name1").WithDescription("desc1"), |
|
|
|
new SlashCommandOptionBuilder() |
|
|
|
.WithType(ApplicationCommandOptionType.String) |
|
|
|
.WithName("name2").WithDescription("desc2"))); |
|
|
|
command.Build(); |
|
|
|
} |
|
|
|
} |