Class BaseTextCommand

java.lang.Object
com.dianxin.tori.api.commands.text.BaseTextCommand
All Implemented Interfaces:
ITextCommand

@ReleasedSince("26.4.234") @Deprecated @ScheduledForRemoval(inVersion="26.10.0") @Obsolete(since="Discord Message Content Intent restrictions") public abstract class BaseTextCommand extends Object implements ITextCommand
Deprecated.
Discord is shifting toward Slash Commands to improve user privacy, security, and discoverability. So we need to deprecate any text command classes to align with Discord's requirements. It is recommended to use Slash command registrars for better experience.
A statically configured base class for legacy text commands.
  • Constructor Details

  • Method Details

    • getJda

      protected JDA getJda()
      Deprecated.
      Retrieves the JDA instance associated with this command.
      Returns:
      The JDA instance.
    • getCommandName

      public String getCommandName()
      Deprecated.
    • getAliases

      public List<String> getAliases()
      Deprecated.
    • getLogger

      protected org.slf4j.Logger getLogger()
      Deprecated.
      Retrieves the logger instance for the current command.
      Returns:
      The Logger instance.
    • handle

      public void handle(MessageReceivedEvent event, String[] args, CommandReplyConfig replyConfig)
      Deprecated.
      Description copied from interface: ITextCommand
      Handles the incoming text command interaction.
      Specified by:
      handle in interface ITextCommand
      Parameters:
      event - The MessageReceivedEvent triggered by Discord.
      args - An array of arguments parsed from the message.
      replyConfig - The configuration used for custom error or rejection messages.
    • execute

      protected abstract void execute(MessageReceivedEvent event, String[] args)
      Deprecated.
      The core execution logic of the text command.
      Parameters:
      event - The valid MessageReceivedEvent.
      args - The parsed command arguments.