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

# ForumChannel

> A forum or media channel: its tags, and how to create a post

A `ForumChannel` is a forum or media channel: it only contains posts, which are threads. It is what `channel.isForum()` gives.

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

async function report(forum: ForumChannel, title: string, details: string) {
  const bug = forum.availableTags.find(tag => tag.name === 'bug');
  const post = await forum.createPost({
    name: title,
    message: { content: details },
    appliedTags: bug ? [bug.id] : [],
  });
  return `Created ${post}`;
}
```

> [!NOTE]
>
> A post is a [`ThreadChannel`](https://www.chapterjs.org/reference/channels/thread): send its messages, archive it or change its tags there. The first message of a post takes everything of [Sending messages](https://www.chapterjs.org/messages.md).

## Properties

It also has everything of [GuildChannel](https://www.chapterjs.org/reference/channels#guildchannel). Messages can't be sent in the forum itself, only in its posts.

**topic** `string | null`

The guidelines of the forum.

**availableTags** `ForumTag[]`

The tags posts of this forum can have. Each entry is a [`ForumTag`](https://www.chapterjs.org/reference/data#forumtag).

## Actions

### createPost()

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

Creates a post in the forum. The options are a [`ForumPostOptions`](https://www.chapterjs.org/reference/options#forumpostoptions).

[Discord documentation](https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel)


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