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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidexecute(MessageReceivedEvent event, String[] args) Deprecated.The core execution logic of the text command.protected JDAgetJda()Deprecated.Retrieves the JDA instance associated with this command.protected org.slf4j.LoggerDeprecated.Retrieves the logger instance for the current command.final voidhandle(MessageReceivedEvent event, String[] args, CommandReplyConfig replyConfig) Deprecated.Handles the incoming text command interaction.
-
Constructor Details
-
ModernBaseTextCommand
Deprecated.
-
-
Method Details
-
getLogger
protected org.slf4j.Logger getLogger()Deprecated.Retrieves the logger instance for the current command. * @return TheLoggerinstance. -
getJda
Deprecated.Retrieves the JDA instance associated with this command. * @return TheJDAinstance. -
handle
Deprecated.Description copied from interface:ITextCommandHandles the incoming text command interaction.- Specified by:
handlein interfaceITextCommand- Parameters:
event- TheMessageReceivedEventtriggered by Discord.args- An array of arguments parsed from the message.replyConfig- The configuration used for custom error or rejection messages.
-
execute
Deprecated.The core execution logic of the text command.- Parameters:
event- The validMessageReceivedEvent.args- The parsed command arguments.
-