> ## Documentation Index
> Fetch the complete documentation index at: https://www.chapterjs.org/llms.txt
> Use this file to discover all available pages before exploring further.

# CategoryChannel

> A category: the channels it groups

A `CategoryChannel` is a category: it groups channels. It is what `channel.isCategory()` gives, and the `parent` of a channel of a server.

```ts theme={"theme":{"light":"github-light","dark":"vesper"}}
import type { CategoryChannel } from 'chapterjs';

async function hide(category: CategoryChannel) {
  const everyone = category.guild.everyoneRole;
  await category.setPermissions(everyone, { deny: ['ViewChannel'] }, 'Category hidden');
  for (const channel of category.children) {
    await channel.setPermissions(everyone, { deny: ['ViewChannel'] }, 'Category hidden');
  }
}
```

> [!NOTE]
>
> Where a channel is in the list, and how to change it, is in [Options](https://www.chapterjs.org/reference/options.md#guildchanneleditoptions): `position` and `parentId`.

## Properties

It also has everything of [GuildChannel](https://www.chapterjs.org/reference/channels#guildchannel). Messages can't be sent in a category.

**children** `GuildChannel[]`

The channels of the category the bot knows, in order.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.