Unique name given to the service
Function to report a service being ready
Function to report error during service launch
Error to report
ID of the worker
Optional
handleFunction to handle commands. Have a function called handleCommand
to your service class to handle commands.
BaseServiceWorker See for an example
Data sent in the command
Optional
shutdownGraceful shutdown of the service. Have a function within your bot class called shutdown
to use this.
To handle errors, return something similar to the following: {err: "error here"}
BaseServiceWorker See for an example
Call this function when your shutdown function is complete.
Generated using TypeDoc
The base class for a service
Example