Class Command.SubcommandGroup

java.lang.Object
net.dv8tion.jda.api.interactions.commands.Command.SubcommandGroup
All Implemented Interfaces:
Formattable, IMentionable, ISnowflake, ICommandReference
Enclosing interface:
Command

public static class Command.SubcommandGroup extends Object implements ICommandReference
An Subcommand Group for a command.
  • Constructor Details

  • Method Details

    • getIdLong

      public long getIdLong()
      The Snowflake id of this entity. This is unique to every entity and will never change.

      This will return the ID of the top level command

      Specified by:
      getIdLong in interface ISnowflake
      Returns:
      Long containing the Id.
    • getName

      @Nonnull public String getName()
      The name of this subcommand group.
      Specified by:
      getName in interface ICommandReference
      Returns:
      The name
    • getNameLocalizations

      @Nonnull public LocalizationMap getNameLocalizations()
      The localizations of this subcommand group's name for various languages.
      Returns:
      The LocalizationMap containing the mapping from DiscordLocale to the localized name
    • getFullCommandName

      @Nonnull public String getFullCommandName()
      Description copied from interface: ICommandReference
      Returns the full command name, including possible subcommand name and subcommand group name.
      This is the name shown on messages or when writing the command in the text input.

      Examples:

      • When used on a normal base command, the full name is the name itself, as in the name "ban" is equal to the full name "ban".
      • When used on a subcommand "ban", of the base command "mod", the full name resolves to "mod ban"
      • When the subcommand is part of a subcommand group, "action" it resolves to "mod action ban"
      Specified by:
      getFullCommandName in interface ICommandReference
      Returns:
      the full command name
    • getDescription

      @Nonnull public String getDescription()
      The description of this subcommand group.
      Returns:
      The description
    • getDescriptionLocalizations

      @Nonnull public LocalizationMap getDescriptionLocalizations()
      The localizations of this subcommand group's description for various languages.
      Returns:
      The LocalizationMap containing the mapping from DiscordLocale to the localized description
    • getSubcommands

      @Nonnull public List<Command.Subcommand> getSubcommands()
      The Subcommands in this group
      Returns:
      Immutable List of Command.Subcommand
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object