Class ModernBaseTextCommand

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

@ReleasedSince("26.4.234") @Deprecated @ScheduledForRemoval(inVersion="26.10.0") @Obsolete(since="Discord Message Content Intent restrictions") public abstract class ModernBaseTextCommand 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.
An annotation-driven base class for legacy text commands.
  • Constructor Details

    • ModernBaseTextCommand

      public ModernBaseTextCommand(JDA jda, IBotMeta meta)
      Deprecated.
  • Method Details

    • getLogger

      protected org.slf4j.Logger getLogger()
      Deprecated.
      Retrieves the logger instance for the current command. * @return The Logger instance.
    • getJda

      protected JDA getJda()
      Deprecated.
      Retrieves the JDA instance associated with this command. * @return The JDA instance.
    • handle

      public final 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.