EventsManager
Create an handler for bot events. The events can be in as many subfolders as desired and there may be other files exporting something else.
Constructor
js
new EventsManager(client, options);
Name | Type | Description | Default | Optional |
---|---|---|---|---|
client | ShewenyClient | The client | None | No |
options | BaseManagerOptions | Options of the events manager | None | No |
Properties
client
The framework client.
Return : ShewenyClient
default
The default data of the events.
Return : EventsManagerDefaultOption
directory
The directory of events.
Return : String
events
The collection of loaded events.
Return : Collection<Event>
Methods
loadAll()
Load all inhibitors in directory of events.
Return : Promise<Collection<String, Event>>
registerAll(events)
Register loaded events and register them if no events exist.
Parameters :
Return : Promise<void>
loadAndRegisterAll()
Load and register all events.
Return : Promise<void>
unloadAll()
Unload all events.
Return : void