Class SlashCommand.Subcommand

java.lang.Object
xyz.dynxsty.dih4jda.interactions.commands.RestrictedCommand
xyz.dynxsty.dih4jda.interactions.commands.application.ApplicationCommand<net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent,net.dv8tion.jda.api.interactions.commands.build.SubcommandData>
xyz.dynxsty.dih4jda.interactions.commands.application.SlashCommand.Subcommand
All Implemented Interfaces:
ExecutableCommand<net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent>
Enclosing class:
SlashCommand

public abstract static class SlashCommand.Subcommand extends ApplicationCommand<net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent,net.dv8tion.jda.api.interactions.commands.build.SubcommandData>
Model class which represents a single Subcommand.
  • Constructor Details

    • Subcommand

      public Subcommand()
      Creates a default instance.
  • Method Details

    • getParent

      @Nullable public SlashCommand getParent()
      Gets the parent for this subcommand.
      Returns:
      The corresponding SlashCommand.
    • asSubcommand

      @Nullable public net.dv8tion.jda.api.interactions.commands.Command.Subcommand asSubcommand()
      Gets the corresponding JDA-entity for this subcommand. If the subcommand was not cached or queued before (e.g. when using sharding), this may return null.
      Returns:
      The Command.Subcommand corresponding to this class.