Interface CommandDefinition
- All Superinterfaces:
Definition
,InteractionDefinition
,com.github.kaktushose.jda.commands.definitions.features.internal.Invokable
,JDAEntity<CommandData>
- All Known Implementing Classes:
ContextCommandDefinition
,SlashCommandDefinition
public sealed interface CommandDefinition
extends InteractionDefinition, JDAEntity<CommandData>
permits ContextCommandDefinition, SlashCommandDefinition
Common interface for command interaction definitions.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.github.kaktushose.jda.commands.definitions.interactions.InteractionDefinition
InteractionDefinition.ReplyConfig
-
Field Summary
Fields inherited from interface com.github.kaktushose.jda.commands.definitions.features.internal.Invokable
log
-
Method Summary
Modifier and TypeMethodDescriptionTheCommand.Type
of this command.@NotNull Set
<Permission> A possibly-emptySet
ofPermission
s this command will be enabled for.boolean
Whether this command can only be executed in guilds.@NotNull LocalizationFunction
TheLocalizationFunction
to use for this command.@NotNull String
name()
The name of the command.boolean
nsfw()
Whether this command is nsfw.@NotNull CommandScope
scope()
TheCommandScope
of this command.Methods inherited from interface com.github.kaktushose.jda.commands.definitions.Definition
displayName
Methods inherited from interface com.github.kaktushose.jda.commands.definitions.interactions.InteractionDefinition
definitionId, newInstance, permissions, replyConfig
Methods inherited from interface com.github.kaktushose.jda.commands.definitions.features.internal.Invokable
clazzDescription, invoke, methodDescription
Methods inherited from interface com.github.kaktushose.jda.commands.definitions.features.JDAEntity
toJDAEntity
-
Method Details
-
name
The name of the command. -
guildOnly
boolean guildOnly()Whether this command can only be executed in guilds. -
nsfw
boolean nsfw()Whether this command is nsfw. -
commandType
TheCommand.Type
of this command. -
enabledPermissions
A possibly-emptySet
ofPermission
s this command will be enabled for. -
scope
TheCommandScope
of this command. -
localizationFunction
TheLocalizationFunction
to use for this command.
-