From 34f7851c0e7c923d611f0ed2661dbe8e0e9d8962 Mon Sep 17 00:00:00 2001 From: Misha133 Date: Fri, 12 Aug 2022 19:49:04 +0300 Subject: [PATCH] add a note about `DontAutoRegisterAttribute` --- docs/guides/int_framework/intro.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/guides/int_framework/intro.md b/docs/guides/int_framework/intro.md index 5cf38bff1..a2aebdf75 100644 --- a/docs/guides/int_framework/intro.md +++ b/docs/guides/int_framework/intro.md @@ -346,6 +346,9 @@ Command registration methods can only be used after the gateway client is ready Methods like `AddModulesToGuildAsync()`, `AddCommandsToGuildAsync()`, `AddModulesGloballyAsync()` and `AddCommandsGloballyAsync()` can be used to register cherry picked modules or commands to global/guild scopes. +> [!NOTE] +> [DontAutoRegisterAttribute] can be used on module classes to to prevent `RegisterCommandsGloballyAsync()` and `RegisterCommandsToGuildAsync()` from registering them to the Discord + > [!NOTE] > In debug environment, since Global commands can take up to 1 hour to register/update, > it is adviced to register your commands to a test guild for your changes to take effect immediately. @@ -377,6 +380,7 @@ delegate can be used to create HTTP responses from a deserialized json object st [DependencyInjection]: xref:Guides.DI.Intro [GroupAttribute]: xref:Discord.Interactions.GroupAttribute +[DontAutoRegisterAttribute]: xref:Discord.Interactions.DontAutoRegisterAttribute [InteractionService]: xref:Discord.Interactions.InteractionService [InteractionServiceConfig]: xref:Discord.Interactions.InteractionServiceConfig [InteractionModuleBase]: xref:Discord.Interactions.InteractionModuleBase