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

# TextChannel

> Un salon textuel ou d’annonces d’un serveur : sujet, mode lent, fils et suivi

Un `TextChannel` est un salon textuel ou d’annonces d’un serveur. C’est ce que donne `channel.isText()`, et le `channel` le plus courant d’une commande ou d’un message.

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

async function openDiscussion(channel: TextChannel, subject: string) {
  const thread = await channel.startThread({ name: subject, autoArchiveDuration: 1440 });
  await thread.send(`Parlons de ${subject} ici.`);
  if (channel.slowmode > 0) await channel.send(`Le mode lent est activé : un message toutes les ${channel.slowmode} s.`);
  return thread;
}
```

> [!NOTE]
>
> Comment envoyer, modifier et lire des messages est dans [Envoyer des messages](https://www.chapterjs.org/fr/messages.md).

## Propriétés

Il a aussi tout ce qu’a [GuildChannel](https://www.chapterjs.org/fr/reference/channels#guildchannel) et [ce que partagent les salons avec des messages](https://www.chapterjs.org/fr/reference/channels#salons-avec-des-messages).

**topic** `string | null`

Le sujet affiché en haut du salon.

**slowmode** `number`

Combien de secondes un membre attend entre deux messages (mode lent).

**isAnnouncement** `boolean`

Si c’est un salon d’annonces, que les serveurs peuvent suivre.

## Actions

### startThread()

```ts theme={"theme":{"light":"github-light","dark":"vesper"}}
startThread(options: ThreadCreateOptions, reason?: string): Promise<ThreadChannel>
```

Démarre un fil qui n’est rattaché à aucun message. Pour en démarrer un depuis un message, utilisez `message.startThread()`. Les options sont un [`ThreadCreateOptions`](https://www.chapterjs.org/fr/reference/options#threadcreateoptions).

[Documentation de Discord](https://docs.discord.com/developers/resources/channel#start-thread-without-message)

### follow()

```ts theme={"theme":{"light":"github-light","dark":"vesper"}}
follow(target: Snowflake | { id: Snowflake }, reason?: string): Promise<void>
```

Fait recevoir à un autre salon ce qui est publié dans ce salon d’annonces.

[Documentation de Discord](https://docs.discord.com/developers/resources/channel#follow-announcement-channel)


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