ServiceManager

Description

Manages instantiation and lifecycles of Service

Generics

M
C

Constructor

new ServiceManager(bot, services)

Parameters

bot:
Bot<M, C>
services:
ServiceType<M, C>[]

Methods

getService(serviceClass)T

Get a service from the manager. Will throw if service does not exist

Parameters
serviceClass:
ServiceType<M, C, T>
hasService(serviceClass)boolean

Check if a Service exists in the manager

Parameters
serviceClass:
ServiceType<M, C>
Service