onRawEvent

Listens to all raw gateway events

Parameters

listener

The method that gets called when a gateway event is received, it is passed the full event string rather than just the data.


fun onRawEvent(names: List<String>, listener: (rawEvent: String) -> Unit)

Listens to a specific set of gateway events

See user docs for a list of possible events

Parameters

names

List of event names to listen to (Case insensitive).

listener

The method that gets called when any of the gateway events are received, it is passed the full event string rather than just the data.


fun onRawEvent(name: String, listener: (rawEvent: String) -> Unit)

Listens to a specific gateway event

See user docs for a list of possible events

Parameters

name

The name of the event (Case insensitive).

listener

The method that gets called when the gateway event is received, it is passed the full event string rather than just the data.