Class JDACommandManager<C>

java.lang.Object
cloud.commandframework.CommandManager<C>
cloud.commandframework.jda.JDACommandManager<C>
Type Parameters:
C - Command sender type
Direct Known Subclasses:
JDA4CommandManager

@Deprecated public class JDACommandManager<C> extends cloud.commandframework.CommandManager<C>
Deprecated.
Command manager for use with JDA
  • Nested Class Summary

    Nested classes/interfaces inherited from class cloud.commandframework.CommandManager

    cloud.commandframework.CommandManager.ManagerSettings, cloud.commandframework.CommandManager.RegistrationState
  • Constructor Summary

    Constructors
    Constructor
    Description
    JDACommandManager(@NonNull net.dv8tion.jda.api.JDA jda, @NonNull Function<@NonNull C,@NonNull String> prefixMapper, @Nullable BiFunction<@NonNull C,@NonNull String,@NonNull Boolean> permissionMapper, @NonNull Function<cloud.commandframework.CommandTree<C>,cloud.commandframework.execution.CommandExecutionCoordinator<C>> commandExecutionCoordinator, @NonNull Function<@NonNull net.dv8tion.jda.api.events.message.MessageReceivedEvent,@NonNull C> commandSenderMapper, @NonNull Function<@NonNull C,@NonNull net.dv8tion.jda.api.events.message.MessageReceivedEvent> backwardsCommandSenderMapper)
    Deprecated.
    Construct a new JDA Command Manager
  • Method Summary

    Modifier and Type
    Method
    Description
    final @NonNull cloud.commandframework.meta.CommandMeta
    Deprecated.
     
    final @NonNull Function<@NonNull C,@NonNull net.dv8tion.jda.api.events.message.MessageReceivedEvent>
    Deprecated.
    Get the backwards command sender plugin
    final long
    Deprecated.
    Get the bots discord id
    final @NonNull Function<@NonNull net.dv8tion.jda.api.events.message.MessageReceivedEvent,@NonNull C>
    Deprecated.
    Get the command sender mapper
    final @NonNull net.dv8tion.jda.api.JDA
    Deprecated.
    Get the JDA instance
    final @NonNull Function<@NonNull C,@NonNull String>
    Deprecated.
    Get the prefix mapper
    final boolean
    hasPermission(@NonNull C sender, @NonNull String permission)
    Deprecated.
     

    Methods inherited from class cloud.commandframework.CommandManager

    argumentBuilder, capabilities, captionRegistry, captionRegistry, captionVariableReplacementHandler, captionVariableReplacementHandler, command, command, commandBuilder, commandBuilder, commandBuilder, commandBuilder, commandBuilder, commandBuilder, commandBuilder, commandBuilder, commandBuilder, commandExecutionCoordinator, commandRegistrationHandler, commandRegistrationHandler, commands, commandSuggestionProcessor, commandSuggestionProcessor, commandSyntaxFormatter, commandSyntaxFormatter, commandTree, createCommandHelpHandler, createCommandHelpHandler, deleteRootCommand, executeCommand, flagBuilder, getCaptionRegistry, getCommandHelpHandler, getCommandHelpHandler, getCommandRegistrationHandler, getCommands, getCommandSuggestionProcessor, getCommandSyntaxFormatter, getCommandTree, getExceptionHandler, getParserRegistry, getRegistrationState, getSetting, handleException, hasCapability, hasPermission, isCommandRegistrationAllowed, lockRegistration, parameterInjectorRegistry, parserRegistry, postprocessContext, preprocessContext, registerCapability, registerCommandPostProcessor, registerCommandPreProcessor, registerDefaultCaptions, registerExceptionHandler, registrationState, requireState, rootCommands, setCaptionRegistry, setCommandRegistrationHandler, setCommandSuggestionProcessor, setCommandSyntaxFormatter, setSetting, suggest, transitionIfPossible, transitionOrThrow

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JDACommandManager

      public JDACommandManager(@NonNull net.dv8tion.jda.api.JDA jda, @NonNull Function<@NonNull C,@NonNull String> prefixMapper, @Nullable BiFunction<@NonNull C,@NonNull String,@NonNull Boolean> permissionMapper, @NonNull Function<cloud.commandframework.CommandTree<C>,cloud.commandframework.execution.CommandExecutionCoordinator<C>> commandExecutionCoordinator, @NonNull Function<@NonNull net.dv8tion.jda.api.events.message.MessageReceivedEvent,@NonNull C> commandSenderMapper, @NonNull Function<@NonNull C,@NonNull net.dv8tion.jda.api.events.message.MessageReceivedEvent> backwardsCommandSenderMapper) throws InterruptedException
      Deprecated.
      Construct a new JDA Command Manager
      Parameters:
      jda - JDA instance to register against
      prefixMapper - Function that maps the sender to a command prefix string
      permissionMapper - Function used to check if a command sender has the permission to execute a command
      commandExecutionCoordinator - Execution coordinator instance. The coordinator is in charge of executing incoming commands. Some considerations must be made when picking a suitable execution coordinator for your platform. For example, an entirely asynchronous coordinator is not suitable when the parsers used in that particular platform are not thread safe. If you have commands that perform blocking operations, however, it might not be a good idea to use a synchronous execution coordinator. In most cases you will want to pick between CommandExecutionCoordinator.simpleCoordinator() and AsynchronousCommandExecutionCoordinator
      commandSenderMapper - Function that maps MessageReceivedEvent to the command sender type
      backwardsCommandSenderMapper - Function that maps the command sender type to MessageReceivedEvent
      Throws:
      InterruptedException - If the jda instance does not ready correctly
  • Method Details

    • getJDA

      public final @NonNull net.dv8tion.jda.api.JDA getJDA()
      Deprecated.
      Get the JDA instance
      Returns:
      JDA instance
    • getPrefixMapper

      public final @NonNull Function<@NonNull C,@NonNull String> getPrefixMapper()
      Deprecated.
      Get the prefix mapper
      Returns:
      Prefix mapper
    • getCommandSenderMapper

      public final @NonNull Function<@NonNull net.dv8tion.jda.api.events.message.MessageReceivedEvent,@NonNull C> getCommandSenderMapper()
      Deprecated.
      Get the command sender mapper
      Returns:
      Command sender mapper
    • getBackwardsCommandSenderMapper

      public final @NonNull Function<@NonNull C,@NonNull net.dv8tion.jda.api.events.message.MessageReceivedEvent> getBackwardsCommandSenderMapper()
      Deprecated.
      Get the backwards command sender plugin
      Returns:
      The backwards command sender mapper
    • getBotId

      public final long getBotId()
      Deprecated.
      Get the bots discord id
      Returns:
      Bots discord id
    • hasPermission

      public final boolean hasPermission(@NonNull C sender, @NonNull String permission)
      Deprecated.
      Specified by:
      hasPermission in class cloud.commandframework.CommandManager<C>
    • createDefaultCommandMeta

      public final @NonNull cloud.commandframework.meta.CommandMeta createDefaultCommandMeta()
      Deprecated.
      Specified by:
      createDefaultCommandMeta in class cloud.commandframework.CommandManager<C>