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:
  • Method Details

    • name

      @NotNull @NotNull String 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

      @NotNull Command.Type commandType()
      The Command.Type of this command.
    • enabledPermissions

      @NotNull @NotNull Set<Permission> enabledPermissions()
      A possibly-empty Set of Permissions this command will be enabled for.
    • scope

      @NotNull @NotNull CommandScope scope()
      The CommandScope of this command.
    • localizationFunction

      @NotNull @NotNull LocalizationFunction localizationFunction()
      The LocalizationFunction to use for this command.