From ef4aa6236332753eaa0001e458e6068cf687a73d Mon Sep 17 00:00:00 2001 From: KeylAmi Date: Wed, 3 Nov 2021 15:06:27 -0700 Subject: [PATCH] Amend creating slash command guide (#269) * Adding BotHTTPInteraction user flag * Added comments explaining the Global command create stipulations. --- .../slash-commands/02-creating-slash-commands.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/guides/interactions/application-commands/slash-commands/02-creating-slash-commands.md b/docs/guides/interactions/application-commands/slash-commands/02-creating-slash-commands.md index 1abab1a25..9e35de285 100644 --- a/docs/guides/interactions/application-commands/slash-commands/02-creating-slash-commands.md +++ b/docs/guides/interactions/application-commands/slash-commands/02-creating-slash-commands.md @@ -79,6 +79,8 @@ public async Task Client_Ready() // With global commands we dont need the guild. await client.CreateGlobalApplicationCommandAsync(globalCommand.Build()); + // Using the ready event is a simple implementation for the sake of the example. Suitable for testing and development. + // For a production bot, it is recommended to only run the CreateGlobalApplicationCommandAsync() once for each command. } catch(ApplicationCommandException exception) { @@ -93,4 +95,4 @@ public async Task Client_Ready() ``` > [!NOTE] -> Slash commands only need to be created once. They do _not_ have to be 'created' on every startup or connection. The example simple shows creating them in the ready event as it's simpler than creating normal bot commands to register slash commands. +> Slash commands only need to be created once. They do _not_ have to be 'created' on every startup or connection. The example simple shows creating them in the ready event as it's simpler than creating normal bot commands to register slash commands. The global commands take up to an hour to register every time the CreateGlobalApplicationCommandAsync() is called for a given command.