actorListener
inline fun <E : Event> EventDispatcher.actorListener(scope: CoroutineScope, context: CoroutineContext = EmptyCoroutineContext, capacity: Int = Channel.RENDEZVOUS, start: CoroutineStart = CoroutineStart.DEFAULT, noinline onCompletion: CompletionHandler? = null, noinline block: suspend ActorScope<E>.() -> Unit): Job
Content copied to clipboard
inline fun <E : Event> GatewayDiscordClient.actorListener(scope: CoroutineScope, context: CoroutineContext = EmptyCoroutineContext, capacity: Int = Channel.RENDEZVOUS, start: CoroutineStart = CoroutineStart.DEFAULT, noinline onCompletion: CompletionHandler? = null, noinline block: suspend ActorScope<E>.() -> Unit): Job
Content copied to clipboard
Creates and launches a new coroutine, which launches an actor coroutine and forwards gateway events of the specified type to it's ReceiveChannel.