Class ModernBaseTextCommand
java.lang.Object
com.dianxin.tori.api.commands.text.ModernBaseTextCommand
- All Implemented Interfaces:
ITextCommand
@Obsolete(since="Discord Message Content Intent restrictions")
public abstract class ModernBaseTextCommand
extends Object
implements ITextCommand
An annotation-driven base class for legacy text commands.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidThe core execution logic of the text command.protected net.dv8tion.jda.api.JDAgetJda()Retrieves the JDA instance associated with this command.protected org.slf4j.LoggerRetrieves the logger instance for the current command.final voidhandle(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, String[] args, CommandReplyConfig replyConfig) Handles the incoming text command interaction.
-
Constructor Details
-
ModernBaseTextCommand
-
-
Method Details
-
getLogger
protected org.slf4j.Logger getLogger()Retrieves the logger instance for the current command. * @return TheLoggerinstance. -
getJda
protected net.dv8tion.jda.api.JDA getJda()Retrieves the JDA instance associated with this command. * @return TheJDAinstance. -
handle
public final void handle(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, String[] args, CommandReplyConfig replyConfig) 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
protected abstract void execute(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, String[] args) The core execution logic of the text command.- Parameters:
event- The validMessageReceivedEvent.args- The parsed command arguments.
-