Class DIH4JDAConfig

java.lang.Object
xyz.dynxsty.dih4jda.config.DIH4JDAConfig

public class DIH4JDAConfig extends Object
Simple data class which represents DIH4JDA's configuration.
  • Constructor Details

    • DIH4JDAConfig

      public DIH4JDAConfig()
      Creates a default instance.
  • Method Details

    • getJDA

      public net.dv8tion.jda.api.JDA getJDA()
      Gets you the JDA instance that DIH4JDA uses.
      Returns:
      the JDA instance.
    • setJDA

      public void setJDA(net.dv8tion.jda.api.JDA jda)
      Sets the JDA instance that DIH4JDA should use.
      Parameters:
      jda - the JDA instance to use.
    • getCommandPackages

      public String[] getCommandPackages()
      Gets the packages where the commands are.
      Standard: new String[]{}
      Returns:
      the package names as an String array
    • setCommandPackages

      public void setCommandPackages(String... commandsPackage)
      Sets one or more packages.
      Parameters:
      commandsPackage - the packages where the commands are located.
    • getBlockedLogTypes

      public DIH4JDALogger.Type[] getBlockedLogTypes()
      Gets you all DIH4JDALogger.Types that are not getting logged.
      Standard: new DIH4JDALogger.Type[]{}
      Returns:
      the DIH4JDALogger.Types as an array.
    • setBlockedLogTypes

      public void setBlockedLogTypes(DIH4JDALogger.Type[] blockedLogTypes)
      Sets one or more DIH4JDALogger.Types that should not be getting logged.
      Parameters:
      blockedLogTypes - the DIH4JDALogger.Type to block.
    • isRegisterOnReady

      public boolean isRegisterOnReady()
      True if all commands should be registered on JDAs ReadyEvent.
      Standard: true
      Returns:
      true if they are getting registered, otherwise false.
    • setRegisterOnReady

      public void setRegisterOnReady(boolean registerOnReady)
      True if all commands should be registered on JDAs ReadyEvent.
      Parameters:
      registerOnReady - true if they should be getting registered, otherwise false.
    • isGlobalSmartQueue

      public boolean isGlobalSmartQueue()
      True if SmartQueue is enabled for global commands.
      Standard: true
      Returns:
      true if it is enabled, otherwise false.
    • setGlobalSmartQueue

      public void setGlobalSmartQueue(boolean globalSmartQueue)
      True if SmartQueue is enabled for global commands.
      Parameters:
      globalSmartQueue - true if it should be enabled, otherwise false.
    • isGuildSmartQueue

      public boolean isGuildSmartQueue()
      True if SmartQueue is enabled for guild only commands.
      Standard: true
      Returns:
      true if it is enabled, otherwise false.
    • setGuildSmartQueue

      public void setGuildSmartQueue(boolean guildSmartQueue)
      True if SmartQueue is enabled for guild only commands.
      Parameters:
      guildSmartQueue - true if it should be enabled, otherwise false.
    • isDeleteUnknownCommands

      public boolean isDeleteUnknownCommands()
      True if unknown commands should be deleted or not.
      Standard: true
      Returns:
      true if they are getting deleted, otherwise false.
    • setDeleteUnknownCommands

      public void setDeleteUnknownCommands(boolean deleteUnknownCommands)
      True if unknown commands should be deleted and false if not.
      Parameters:
      deleteUnknownCommands - true if they should be getting deleted, otherwise false.
    • isDefaultPrintStacktrace

      public boolean isDefaultPrintStacktrace()
      True if the stacktrace should be printed on an DIH4JDAThrowableEvent if no DIH4JDAEventListener is registered.
      Standard: true
      Returns:
      true if they are getting printed.
    • setDefaultPrintStacktrace

      public void setDefaultPrintStacktrace(boolean defaultPrintStacktrace)
      True if the stacktrace should be printed on an DIH4JDAThrowableEvent if no DIH4JDAEventListener is registered.
      Parameters:
      defaultPrintStacktrace - true if they should be getting printed.
    • getExecutor

      public Executor getExecutor()
      Gets you the Executor that executes every command.
      Standard: ForkJoinPool.commonPool()
      Returns:
      the Executor instance.
    • setExecutor

      public void setExecutor(Executor executor)
      Sets a new Executor.
      Parameters:
      executor - the new Executor to use.
    • isThrowUnregisteredException

      public boolean isThrowUnregisteredException()
      True if the CommandNotRegisteredException should be thrown or not.
      Standard: true
      Returns:
      true if it will be thrown.
    • setThrowUnregisteredException

      public void setThrowUnregisteredException(boolean throwUnregisteredException)
      True if the CommandNotRegisteredException should be thrown or not.
      Parameters:
      throwUnregisteredException - true if it should be thrown.