inTopChannel

suspend fun <T : Event> CheckContext<T>.inTopChannel(builder: suspend (T) -> ChannelBehavior)

Check asserting that an Event fired within a given channel. If the event fired within a thread, it checks the thread's parent channel instead.

Only events that can reasonably be associated with a single channel are supported. Please raise an issue if an event you expected to be supported, isn't.

Parameters

builder

Lambda returning the channel to compare to.


suspend fun <T : Event> CheckContext<T>.inTopChannel(id: Snowflake)

Check asserting that an Event fired within a given channel. If the event fired within a thread, it checks the thread's parent channel instead.

Only events that can reasonably be associated with a single channel are supported. Please raise an issue if an event you expected to be supported, isn't.

Parameters

id

Channel snowflake to compare to.