getCategory

fun GuildChannelBehavior.getCategory(): CategoryBehavior?

Get the corresponding category channel for the given channel.

  • If this is a thread channel, return the parent channel's category.

  • If this is a categorizable channel, return its parent.

  • If this is a category, return it.

  • Otherwise, return null.