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 Summary
ConstructorsConstructorDescriptionBaseTextCommand(String title, List<String> aliases, JDA jda, IBotMeta meta, boolean guildOnly, boolean ownerOnly, boolean privateChannelOnly, boolean directMessageOnly, List<Permission> permissionsRequired, List<Permission> selfPermissionsRequired, boolean isDebug) Deprecated.BaseTextCommand(String title, List<String> aliases, JDA jda, IBotMeta meta, LegacyCommandBuilder builder) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidexecute(MessageReceivedEvent event, String[] args) Deprecated.The core execution logic of the text command.Deprecated.Deprecated.protected JDAgetJda()Deprecated.Retrieves the JDA instance associated with this command.protected org.slf4j.LoggerDeprecated.Retrieves the logger instance for the current command.voidhandle(MessageReceivedEvent event, String[] args, CommandReplyConfig replyConfig) Deprecated.Handles the incoming text command interaction.
-
Constructor Details
-
BaseTextCommand
public BaseTextCommand(String title, List<String> aliases, JDA jda, IBotMeta meta, boolean guildOnly, boolean ownerOnly, boolean privateChannelOnly, boolean directMessageOnly, List<Permission> permissionsRequired, List<Permission> selfPermissionsRequired, boolean isDebug) Deprecated. -
BaseTextCommand
public BaseTextCommand(String title, List<String> aliases, JDA jda, IBotMeta meta, LegacyCommandBuilder builder) Deprecated.
-
-
Method Details
-
getJda
Deprecated.Retrieves the JDA instance associated with this command.- Returns:
- The
JDAinstance.
-
getCommandName
Deprecated. -
getAliases
Deprecated. -
getLogger
protected org.slf4j.Logger getLogger()Deprecated.Retrieves the logger instance for the current command.- Returns:
- The
Loggerinstance.
-
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.
-