Interface CommandDefinition

All Superinterfaces:
Definition, InteractionDefinition, Invokable, JDAEntity<net.dv8tion.jda.api.interactions.commands.build.CommandData>
All Known Implementing Classes:
ContextCommandDefinition, SlashCommandDefinition

public sealed interface CommandDefinition extends InteractionDefinition, JDAEntity<net.dv8tion.jda.api.interactions.commands.build.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 net.dv8tion.jda.api.interactions.commands.Command.Type commandType()
      The Command.Type of this command.
    • enabledPermissions

      @NotNull @NotNull Set<net.dv8tion.jda.api.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 net.dv8tion.jda.api.interactions.commands.localization.LocalizationFunction localizationFunction()
      The LocalizationFunction to use for this command.