await
inline suspend fun <T : GenericEvent> JDA.await(crossinline filter: (T) -> Boolean = { true }): T(source)
Suspends until an event of type T satisfying the filter is received on this shard, then returns it.
If you wish to use a timeout with it, you can use withTimeoutOrNull.
inline suspend fun <T : GenericEvent> ShardManager.await(crossinline filter: (T) -> Boolean = { true }): T(source)
Suspends until an event of type T satisfying the filter is received on any shard, then returns it.
If you wish to use a timeout with it, you can use withTimeoutOrNull.