# ForumTopic

## Properties

| Property         | Description                                                                | Type                                                                                                                                                                                   |
| ---------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \_client         | Client                                                                     | Client                                                                                                                                                                                 |
| id               | Forum topic id                                                             | Number                                                                                                                                                                                 |
| guildID          | Guild/server id                                                            | String                                                                                                                                                                                 |
| channelID        | Forum channel id                                                           | String                                                                                                                                                                                 |
| name             | Topic name/title                                                           | String                                                                                                                                                                                 |
| title            | Topic name/title                                                           | String                                                                                                                                                                                 |
| \_createdAt      | Timestamp (unix epoch time) of the topic's creation.                       | Number                                                                                                                                                                                 |
| memberID         | ID of the member who created the topic                                     | String                                                                                                                                                                                 |
| webhookID        | ID of the webhook that created the topic (if created by webhook)           | String                                                                                                                                                                                 |
| \_updatedAt      | Timestamp (unix epoch time) of when the topic got updated. (if updated)    | Number\|null                                                                                                                                                                           |
| bumpedAt         | Timestamp (unix epoch time) that the forum topic was bumped at.            | String                                                                                                                                                                                 |
| content          | Content of the topic                                                       | String                                                                                                                                                                                 |
| mentions         | Topic mentions                                                             | Object ([<mark style="color:purple;">MentionsTypes</mark>](https://github.com/DinographicPixels/touchguild-docs/blob/main/documentation/select-version/v.0.1.7/types/mentionstype.md)) |
| guild            | Guild/server the topic is in                                               | Guild                                                                                                                                                                                  |
| member           | Member who created the topic                                               | Member                                                                                                                                                                                 |
| channel          | The forum channel, where the topic is in                                   | Channel                                                                                                                                                                                |
| createdAt        | string representation of the \_createdAt timestamp                         | Date                                                                                                                                                                                   |
| updatedAt        | string representation of the \_updatedAt timestamp                         | Date\|null                                                                                                                                                                             |
| createdByWebhook | Boolean that tells you if the forum topic was created by a webhook or not. | Boolean                                                                                                                                                                                |

## Constructor

```javascript
new ForumTopic(rawData, client)
```

| Properties | Description                                     | Type                                                                 | Required? |
| ---------- | ----------------------------------------------- | -------------------------------------------------------------------- | --------- |
| rawData    | raw data received from ws and converted to JSON | Object                                                               | true      |
| client     | Client                                          | [Client](/documentation/select-version/v.0.1.7/components/client.md) | true      |

{% hint style="danger" %}
Do not use this constructor unless you know what you're doing. This constructor is used to return you rawdata into component.
{% endhint %}

## Methods

### edit(options)

Edit the forum topic.

| Properties       | Description           | Type   | Required? |
| ---------------- | --------------------- | ------ | --------- |
| options          | Edit options          | Object | true      |
| options.title?   | New topic title/name. | String | false     |
| options.content? | New topic content.    | String | false     |

> Returns: <mark style="color:purple;">Promise<</mark>[<mark style="color:purple;">CalendarEventRSVP</mark>](/documentation/select-version/v.0.1.7/components/calendareventrsvp.md)<mark style="color:purple;">></mark>

### delete()

Delete the forum topic.

> Returns: <mark style="color:purple;">Promise\<void></mark>

### pin()

Pin the forum topic.

> Returns: <mark style="color:purple;">Promise\<void></mark>

### unpin()

Unpin the forum topic.

> Returns: <mark style="color:purple;">Promise\<void></mark>

### lock()

Lock the forum topic.

> Returns: <mark style="color:purple;">Promise\<void></mark>

### unlock()

Unlock the forum topic

> Returns: <mark style="color:purple;">Promise\<void></mark>

### addReaction(emoteID)

Add a reaction to the forum topic.

| Properties | Description     | Type   | Required? |
| ---------- | --------------- | ------ | --------- |
| emoteID    | id of the emote | Number | true      |

> Returns: <mark style="color:purple;">Promise\<void></mark>

### removeReaction(emoteID)

Remove a reaction from a forum topic.

| Properties | Description     | Type   | Required? |
| ---------- | --------------- | ------ | --------- |
| emoteID    | id of the emote | Number | true      |

> Returns: <mark style="color:purple;">Promise\<void></mark>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://legacy.docs.touchguild.com/documentation/select-version/v.0.1.7/components/forumtopic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
