getChannelOf

inline suspend fun <T : Channel> ChannelEvent.getChannelOf(): T

Get a channel object of the given type, or throw if one can't be retrieved or cast.