Annotation Interface CommandConfig
Used to configure the registration of commands.
Interaction methods annotated with CommandConfig will use the configured values of this annotation when registering.
Interaction classes annotated with CommandConfig will apply the configured values of this annotation to
every method, if and only if no annotation is present at method level. If the CommandConfig annotation is neither
present at the class level nor the method level, the global CommandConfig
will be used instead.
In other words the hierarchy is as following:
2. ReplyConfig method annotation
3. ReplyConfig class annotation
4. global CommandConfig provided in JDACBuilder
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionTheInteractionContextTypes to use.Returns an array ofPermissionthis command should be enabled for by default.TheIntegrationTypes to use.booleanWhether the configured command(s) can only be executed in NSFW channels.TheCommandScopeto use.
-
Element Details
-
context
InteractionContextType[] contextTheInteractionContextTypes to use. The default value isInteractionContextType.GUILD.- Returns:
- the
InteractionContextTypes to use
- Default:
{GUILD}
-
integration
IntegrationType[] integrationTheIntegrationTypes to use. The default value isIntegrationType.GUILD_INSTALL.- Returns:
- the
IntegrationTypes to use
- Default:
{GUILD_INSTALL}
-
scope
CommandScope scopeTheCommandScopeto use. The default value isCommandScope.GLOBAL.- Returns:
- the
CommandScopeto use
- Default:
GLOBAL
-
isNSFW
boolean isNSFWWhether the configured command(s) can only be executed in NSFW channels.- Returns:
trueif the configured command(s) can only be executed in NSFW channels
- Default:
false
-
enabledFor
Permission[] enabledForReturns an array ofPermissionthis command should be enabled for by default. Note that guild admins can modify this at any time.- Returns:
- an array of permissions this command will be enabled for by default
- See Also:
- Default:
{UNKNOWN}
-