add forced as subcommand

This commit is contained in:
Stanley Dimant
2022-08-02 22:01:15 +02:00
parent 432994d1d5
commit e19d6d882c

View File

@@ -291,14 +291,13 @@ namespace MareSynchronosServer.Discord
private async Task DiscordClient_Ready()
{
var register = new SlashCommandBuilder();
register.WithName("register");
register.WithDescription("Starts the registration process for the Mare Synchronos server of this Discord");
var registerForced = new SlashCommandBuilder();
registerForced.WithName("register");
registerForced.WithDescription("Starts the registration process for the Mare Synchronos server of this Discord");
registerForced.AddOption("forced", ApplicationCommandOptionType.SubCommand, "Will forcefully overwrite your current character on the service, if present", false, false);
var register = new SlashCommandBuilder()
.WithName("register")
.WithDescription("Starts the registration process for the Mare Synchronos server of this Discord")
.AddOption(new SlashCommandOptionBuilder()
.WithName("forced")
.WithDescription("Will forcefully overwrite your current character on the service, if present")
.WithType(ApplicationCommandOptionType.SubCommand));
var verify = new SlashCommandBuilder();
verify.WithName("verify");
@@ -307,7 +306,6 @@ namespace MareSynchronosServer.Discord
try
{
await discordClient.CreateGlobalApplicationCommandAsync(register.Build());
await discordClient.CreateGlobalApplicationCommandAsync(registerForced.Build());
await discordClient.CreateGlobalApplicationCommandAsync(verify.Build());
}
catch (Exception ex)