Skip to content
On this page

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);
NameTypeDescriptionDefaultOptional
clientShewenyClientThe clientNoneNo
optionsBaseManagerOptionsOptions of the events managerNoneNo
Properties
Methods

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