Methods
(async) fetchEventContext(config) → {Object|String}
- Source:
Fetches the discord.js object representing the provided context
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object | configuration object Properties
|
Returns:
context object or 'global' for global context
- Type
- Object | String
init(config)
- Source:
Initializes a new EventController
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
config |
Object | configuration object Properties
|
(async) initializeIfMissing(server, event, doc)
- Source:
Helper method that initializes the database document if missing
Parameters:
Name | Type | Description |
---|---|---|
server |
Esdi | Esdi server instance |
event |
Event | Event for which to initialize database document |
doc |
Object | database document to check before starting |
loop()
- Source:
Called every Esdi server loop
Listens to Events:
registerDiscordEvents(client)
- Source:
Registers Discord Events to the provided discord.js Client
Parameters:
Name | Type | Description |
---|---|---|
client |
external:Client | discord.js Client |
(async) start()
- Source:
Starts the EventController
Listens to Events:
stop()
- Source:
Stops the EventController
Listens to Events:
updateLocalEventContexts(config)
- Source:
Updates the interval Event contexts stored on the local Esdi server instance
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object | configuration object Properties
|