Package com.dianxin.tori.api.commands
Class TextCommandRegistrar
java.lang.Object
com.dianxin.tori.api.commands.TextCommandRegistrar
@ReleasedSince("26.4.234")
@Deprecated
@ScheduledForRemoval(inVersion="26.10.0")
@Obsolete(since="Discord Message Content Intent restrictions")
public class TextCommandRegistrar
extends Object
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.
The registrar for legacy text-based commands.
-
Constructor Summary
ConstructorsConstructorDescriptionTextCommandRegistrar(String prefix) Deprecated.Constructs a new TextCommandRegistrar. -
Method Summary
Modifier and TypeMethodDescriptionvoidonEvent(@NotNull MessageReceivedEvent event) Deprecated.Handles the incoming message event, parses the command, and delegates execution.register(@NotNull BaseTextCommand... cmds) Deprecated.Registers statically configured base text commands.register(@NotNull ModernBaseTextCommand... cmds) Deprecated.Registers annotation-driven modern text commands.setReplyConfig(CommandReplyConfig config) Deprecated.Sets the reply configuration for permission denials.
-
Constructor Details
-
TextCommandRegistrar
Deprecated.Constructs a new TextCommandRegistrar.- Parameters:
prefix- The prefix used to trigger commands (e.g., "!").
-
-
Method Details
-
setReplyConfig
Deprecated.Sets the reply configuration for permission denials.- Parameters:
config- The newCommandReplyConfig.- Returns:
- This registrar instance.
-
register
Deprecated.Registers statically configured base text commands.- Parameters:
cmds- The commands to register.- Returns:
- This registrar instance.
-
register
Deprecated.Registers annotation-driven modern text commands.- Parameters:
cmds- The commands to register.- Returns:
- This registrar instance.
-
onEvent
Deprecated.Handles the incoming message event, parses the command, and delegates execution.- Parameters:
event- TheMessageReceivedEvent.
-