Class Module<TConfig extends ModuleConfig>
java.lang.Object
enterprises.iwakura.modularbot.base.Module<TConfig>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets a list of all Irminsul entities (JPA-like entities) used by this module.voidonCommandClientBuilderInitialization(@NonNull com.jagrosh.jdautilities.command.CommandClientBuilder commandClientBuilder) This method is called when the JDA Utilities'CommandClientBuilderis initializing.voidonConsoleCommandRegistration(@NonNull enterprises.iwakura.ganyu.Ganyu ganyu) This method is called when Modular Bot is registering console commandsabstract voidThis method is called when the module is disablingabstract voidonEnable()This method is called when the module is enablingvoidonLoad()This method is called when the module is loadedvoidonShardManagerBuilderInitialization(@NonNull net.dv8tion.jda.api.sharding.DefaultShardManagerBuilder shardManagerBuilder) This method is called when the JDA is initializing.voidonUncaughtException(@NonNull Throwable throwable) This method is called when some exception is uncaughtvoidonUnload()This method is called when the module is unloadedvoidsetModuleConfig(ModuleConfig moduleConfig) Sets the module configuration.
-
Constructor Details
-
Module
public Module()
-
-
Method Details
-
onLoad
public void onLoad()This method is called when the module is loaded -
onEnable
public abstract void onEnable()This method is called when the module is enabling -
onDisable
public abstract void onDisable()This method is called when the module is disabling -
onUnload
public void onUnload()This method is called when the module is unloaded -
onCommandClientBuilderInitialization
public void onCommandClientBuilderInitialization(@NonNull @NonNull com.jagrosh.jdautilities.command.CommandClientBuilder commandClientBuilder) This method is called when the JDA Utilities'CommandClientBuilderis initializing. You cna register commands here and more.- Parameters:
commandClientBuilder- Non-nullCommandClientBuilder
-
onShardManagerBuilderInitialization
public void onShardManagerBuilderInitialization(@NonNull @NonNull net.dv8tion.jda.api.sharding.DefaultShardManagerBuilder shardManagerBuilder) This method is called when the JDA is initializing. You can register events here and more.- Parameters:
shardManagerBuilder- Non-nullDefaultShardManagerBuilder
-
onConsoleCommandRegistration
public void onConsoleCommandRegistration(@NonNull @NonNull enterprises.iwakura.ganyu.Ganyu ganyu) This method is called when Modular Bot is registering console commands- Parameters:
ganyu- Non-nullGanyu
-
onUncaughtException
This method is called when some exception is uncaught- Parameters:
throwable- Non-nullThrowable
-
getIrminsulEntities
Gets a list of all Irminsul entities (JPA-like entities) used by this module. These will be registered automatically.- Returns:
- Non-null list of JPA entities
-
setModuleConfig
Sets the module configuration. This is called by Modular Bot itself.- Parameters:
moduleConfig- Non-nullModuleConfig
-