Interface WebsocketEvents

Internal websocket events.

interface WebsocketEvents {
    debug: [message: string | object];
    disconnect: [error: Error];
    error: [error: Error];
    exit: [message: string | Error];
    GATEWAY_PACKET: [packet: AnyPacket];
    GATEWAY_PARSED_PACKET: [type: null | string, data: object];
    GATEWAY_UNKNOWN_PACKET: [message: string, packet: AnyPacket];
    GATEWAY_WELCOME: [data: APIBotUser];
    GATEWAY_WELCOME_PACKET: [packet: WelcomePacket];
}

Events

debug: [message: string | object]

Emitted to debug.

disconnect: [error: Error]

Emitted when disconnected from gateway.

error: [error: Error]

Emitted after getting an error.

exit: [message: string | Error]

Emitted when process exit.

GATEWAY_PACKET: [packet: AnyPacket]

Emitted when a packet is sent.

GATEWAY_PARSED_PACKET: [type: null | string, data: object]

Emitted when a packet is parsed.

GATEWAY_UNKNOWN_PACKET: [message: string, packet: AnyPacket]

Emitted when a packet isn't recognized.

GATEWAY_WELCOME: [data: APIBotUser]

Emitted when connected to gateway.

GATEWAY_WELCOME_PACKET: [packet: WelcomePacket]

Emitted when connected to gateway.