> ## 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

> Une catégorie : les salons qu’elle regroupe

Un `CategoryChannel` est une catégorie : elle regroupe des salons. C’est ce que donne `channel.isCategory()`, et le `parent` d’un salon d’un serveur.

```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'] }, 'Catégorie masquée');
  for (const channel of category.children) {
    await channel.setPermissions(everyone, { deny: ['ViewChannel'] }, 'Catégorie masquée');
  }
}
```

> [!NOTE]
>
> Où se trouve un salon dans la liste, et comment le changer, est dans [Options](https://www.chapterjs.org/fr/reference/options.md#guildchanneleditoptions) : `position` et `parentId`.

## Propriétés

Il a aussi tout ce qu’a [GuildChannel](https://www.chapterjs.org/fr/reference/channels#guildchannel). On ne peut pas envoyer de messages dans une catégorie.

**children** `GuildChannel[]`

Les salons de la catégorie que connaît le bot, dans l’ordre.


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