topChannelFor

suspend fun topChannelFor(event: Event): ChannelBehavior?

Retrieves a channel that is the subject of a given event, if possible, returning the parent if the channel is a thread.

This function only supports a specific set of events - any unsupported events will simply result in a null value. Please note that some events may support a null value for this type of object, and this will also be reflected in the return value.

Return

A ChannelBehavior representing the channel, or null if there isn't one.

Parameters

event

The event concerning to the channel to retrieve.