From 3740e2ff996c87f9b3d2b4ac2e6f117a70f27b0c Mon Sep 17 00:00:00 2001 From: KubaZ2 Date: Fri, 15 Nov 2024 18:52:07 +0100 Subject: [PATCH] Add a note about refreshing the Discord client to see application commands --- .../application-commands/introduction.md | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Documentation/guides/services/application-commands/introduction.md b/Documentation/guides/services/application-commands/introduction.md index 88e8a470..5e0ab25e 100644 --- a/Documentation/guides/services/application-commands/introduction.md +++ b/Documentation/guides/services/application-commands/introduction.md @@ -1,17 +1,9 @@ ---- +--- uid: application-commands --- # Introduction -> [!IMPORTANT] -> Please note that names of: -> - slash commands -> - sub slash commands -> - slash command parameters -> -> **must** be lowercase. - ## [.NET Generic Host](#tab/generic-host) Adding application commands with the .NET Generic Host is very easy. Use @NetCord.Hosting.Services.ApplicationCommands.ApplicationCommandServiceServiceCollectionExtensions.AddApplicationCommands``2(Microsoft.Extensions.DependencyInjection.IServiceCollection) to add an application command service to your host builder. Then, use @NetCord.Hosting.Services.ApplicationCommands.ApplicationCommandServiceHostExtensions.AddSlashCommand*, @NetCord.Hosting.Services.ApplicationCommands.ApplicationCommandServiceHostExtensions.AddUserCommand* or @NetCord.Hosting.Services.ApplicationCommands.ApplicationCommandServiceHostExtensions.AddMessageCommand* to add an application command using the minimal APIs way and/or use @NetCord.Hosting.Services.ServicesHostExtensions.AddModules(Microsoft.Extensions.Hosting.IHost,System.Reflection.Assembly) to add modules from an assembly. You also need to use @NetCord.Hosting.Gateway.GatewayEventHandlerHostExtensions.UseGatewayEventHandlers(Microsoft.Extensions.Hosting.IHost) to bind the service event handlers. @@ -38,6 +30,17 @@ Now, we should send the commands to Discord, to make them usable. Add the follow *** +> [!NOTE] +> If you don't see the commands in Discord, try refreshing the Discord client using `Ctrl + R` on PC or `⌘ + R` on Mac. + +> [!IMPORTANT] +> Please note that names of: +> - slash commands +> - sub slash commands +> - slash command parameters +> +> **must** be lowercase. + ### Example Modules Here you can see example modules for each type of application command.