isBelow

suspend fun GuildChannelBehavior.isBelow(other: GuildChannelBehavior): Boolean

Check whether the receiver (this) is below the given other channel in the channel list.

This function attempts to calculate this the same way the Discord client does:

  • Channels outside a category are always at the top.

  • Compare channels within the same category (or both at the top) by position.

  • Compare parent categories by position.

This function throws an exception if the comparison doesn't make sense. This shouldn't ever happen unless Kord's type system breaks.