public interface IModule
When enabled, modules are registered as event listeners, so your module can use EventSubscriber
or
IListener
to listen for events.
Modules MUST have a default constructor.
Information about module loading.
Modifier and Type | Method and Description |
---|---|
void |
disable()
Called to disable the module.
|
boolean |
enable(IDiscordClient client)
Called to enable the module.
|
String |
getAuthor()
Gets the author(s) of the module.
|
String |
getMinimumDiscord4JVersion()
Gets the minimum required version of Discord4J for the module to function.
|
String |
getName()
Gets the name of the module.
|
String |
getVersion()
Gets the version of the module.
|
boolean enable(IDiscordClient client)
client
- The client the module instance is being enabled for.void disable()
It is important that the module implementation attempt to do any and all cleanup in this method in order for the module to properly unload. The module loader can make no guarantees about the unloading of modules if they do not properly implement this method.
String getName()
String getAuthor()
String getVersion()
String getMinimumDiscord4JVersion()
Copyright © 2018. All rights reserved.