File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
docs/guides/int_basics/application-commands/slash-commands Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,10 @@ title: Slash Command Bulk Overwrites
66If you have too many global commands then you might want to consider using the bulk overwrite function.
77
88``` cs
9- public async Task Client_Ready ()
9+ public async Task Client_Ready ()
1010{
1111 List < ApplicationCommandProperties > applicationCommandProperties = new ();
12- try
12+ try
1313 {
1414 // Simple help slash command.
1515 SlashCommandBuilder globalCommandHelp = new SlashCommandBuilder ();
@@ -27,11 +27,12 @@ public async Task Client_Ready()
2727 SlashCommandBuilder globalCommandAddFamily = new SlashCommandBuilder ();
2828 globalCommandAddFamily .WithName (" add-family" );
2929 globalCommandAddFamily .WithDescription (" Add a family" );
30+ globalCommandAddFamily .AddOptions (slashCommandOptionBuilder );
3031 applicationCommandProperties .Add (globalCommandAddFamily .Build ());
3132
3233 await _client .BulkOverwriteGlobalApplicationCommandsAsync (applicationCommandProperties .ToArray ());
33- }
34- catch (ApplicationCommandException exception )
34+ }
35+ catch (ApplicationCommandException exception )
3536 {
3637 var json = JsonConvert .SerializeObject (exception .Error , Formatting .Indented );
3738 Console .WriteLine (json );
You can’t perform that action at this time.
0 commit comments