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