Methods
addListener
- addListener(event: "connected", listener: connected): this
- addListener(event: "authenticating", listener: authenticating): this
- addListener(event: "authenticated", listener: authenticated): this
- addListener(event: "ready", listener: ready): this
- addListener(event: "message", listener: message): this
- addListener(event: "ok", listener: ok): this
- addListener(event: "error", listener: error): this
- addListener(event: "disconnected", listener: disconnected): this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
emit
- emit(event: "connected" | "authenticating" | "authenticated" | "ready"): void
- emit(event: "message", message: ElkMessage): void
- emit(event: "ok", raw: string): void
- emit(event: "error", error: Error): void
- emit(event: "disconnected", error?: Error): void
- emit(event: string | symbol, ...args: any[]): boolean
-
Parameters
-
event: "connected" | "authenticating" | "authenticated" | "ready"
Returns void
-
Parameters
-
event: "message"
-
message: ElkMessage
Returns void
-
Parameters
Returns void
-
Parameters
-
event: "error"
-
error: Error
Returns void
-
Parameters
-
event: "disconnected"
-
Optional error: Error
Returns void
-
Parameters
-
event: string | symbol
-
Rest ...args: any[]
Returns boolean
on
- on(event: "connected", listener: connected): this
- on(event: "authenticating", listener: authenticating): this
- on(event: "authenticated", listener: authenticated): this
- on(event: "ready", listener: ready): this
- on(event: "message", listener: message): this
- on(event: "ok", listener: ok): this
- on(event: "error", listener: error): this
- on(event: "disconnected", listener: disconnected): this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
once
- once(event: "connected", listener: connected): this
- once(event: "authenticating", listener: authenticating): this
- once(event: "authenticated", listener: authenticated): this
- once(event: "ready", listener: ready): this
- once(event: "message", listener: message): this
- once(event: "ok", listener: ok): this
- once(event: "error", listener: error): this
- once(event: "disconnected", listener: disconnected): this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
prependListener
- prependListener(event: "connected", listener: connected): this
- prependListener(event: "authenticating", listener: authenticating): this
- prependListener(event: "authenticated", listener: authenticated): this
- prependListener(event: "ready", listener: ready): this
- prependListener(event: "message", listener: message): this
- prependListener(event: "ok", listener: ok): this
- prependListener(event: "error", listener: error): this
- prependListener(event: "disconnected", listener: disconnected): this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
prependOnceListener
- prependOnceListener(event: "connected", listener: connected): this
- prependOnceListener(event: "authenticating", listener: authenticating): this
- prependOnceListener(event: "authenticated", listener: authenticated): this
- prependOnceListener(event: "ready", listener: ready): this
- prependOnceListener(event: "message", listener: message): this
- prependOnceListener(event: "ok", listener: ok): this
- prependOnceListener(event: "error", listener: error): this
- prependOnceListener(event: "disconnected", listener: disconnected): this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
removeListener
- removeListener(event: "connected", listener: connected): this
- removeListener(event: "authenticating", listener: authenticating): this
- removeListener(event: "authenticated", listener: authenticated): this
- removeListener(event: "ready", listener: ready): this
- removeListener(event: "message", listener: message): this
- removeListener(event: "ok", listener: ok): this
- removeListener(event: "error", listener: error): this
- removeListener(event: "disconnected", listener: disconnected): this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this
-
Parameters
Returns this