Class TextCommandRegistrar

java.lang.Object
com.dianxin.tori.api.commands.TextCommandRegistrar

@Obsolete(since="Discord Message Content Intent restrictions") public class TextCommandRegistrar extends Object
The registrar for legacy text-based commands.
  • Constructor Details

    • TextCommandRegistrar

      public TextCommandRegistrar(String prefix)
      Constructs a new TextCommandRegistrar.
      Parameters:
      prefix - The prefix used to trigger commands (e.g., "!").
  • Method Details

    • setReplyConfig

      public TextCommandRegistrar setReplyConfig(CommandReplyConfig config)
      Sets the reply configuration for permission denials.
      Parameters:
      config - The new CommandReplyConfig.
      Returns:
      This registrar instance.
    • register

      public TextCommandRegistrar register(@NotNull @NotNull BaseTextCommand... cmds)
      Registers statically configured base text commands.
      Parameters:
      cmds - The commands to register.
      Returns:
      This registrar instance.
    • register

      public TextCommandRegistrar register(@NotNull @NotNull ModernBaseTextCommand... cmds)
      Registers annotation-driven modern text commands.
      Parameters:
      cmds - The commands to register.
      Returns:
      This registrar instance.
    • onEvent

      public void onEvent(@NotNull @NotNull net.dv8tion.jda.api.events.message.MessageReceivedEvent event)
      Handles the incoming message event, parses the command, and delegates execution.
      Parameters:
      event - The MessageReceivedEvent.