listener
inline fun <E : Event> EventDispatcher.listener(scope: CoroutineScope, context: CoroutineContext = EmptyCoroutineContext, capacity: Int = Channel.RENDEZVOUS, start: CoroutineStart = CoroutineStart.DEFAULT, crossinline block: suspend CoroutineScope.(E) -> Unit): Job
Content copied to clipboard
inline fun <E : Event> GatewayDiscordClient.listener(scope: CoroutineScope, context: CoroutineContext = EmptyCoroutineContext, capacity: Int = Channel.RENDEZVOUS, start: CoroutineStart = CoroutineStart.DEFAULT, crossinline block: suspend CoroutineScope.(E) -> Unit): Job
Content copied to clipboard
Creates and launches a new coroutine, which listens to the specified Event type and calls the block function whenever a new event of that type is received by the gateway.