# ListItem

## Properties

| Property         | Description                                                                                             | Type                                                                                                                                                                                  |
| ---------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \_data           | raw data                                                                                                | Object                                                                                                                                                                                |
| \_client         | client                                                                                                  | [Client](/documentation/select-version/v.0.1.7/components/client.md)                                                                                                                  |
| id               | item id                                                                                                 | String                                                                                                                                                                                |
| guildID          | id of the guild                                                                                         | String                                                                                                                                                                                |
| channelID        | id of the list channel                                                                                  | String                                                                                                                                                                                |
| content          | content of the item                                                                                     | String                                                                                                                                                                                |
| mentions         | mentions contained in the item                                                                          | Object ([<mark style="color:purple;">MentionsType</mark>](https://github.com/DinographicPixels/touchguild-docs/blob/main/documentation/select-version/v.0.1.7/types/mentionstype.md)) |
| \_createdAt      | timestamp of item's creation                                                                            | Number                                                                                                                                                                                |
| memberID         | id of the member who created the item                                                                   | String                                                                                                                                                                                |
| webhookID        | id of the webhook who created/updated the item.                                                         | String                                                                                                                                                                                |
| \_updatedAt      | timestamp of when the item got updated                                                                  | Number                                                                                                                                                                                |
| updatedBy        | id of the member that updated the item, if updated.                                                     | String                                                                                                                                                                                |
| parentListItemID | The ID of the parent list item if this list item is nested                                              | String                                                                                                                                                                                |
| \_completedAt    | timestamp of the item's completion                                                                      | Number                                                                                                                                                                                |
| completedBy      | set to completed by'?'                                                                                  | String                                                                                                                                                                                |
| note             | note object provided by guilded, with all the note information.                                         | Object                                                                                                                                                                                |
| member           | Member component of the the owner of the item or the user who updated the item (depends on the action). | [Member](/documentation/select-version/v.0.1.7/components/member.md)\|void                                                                                                            |
| createdAt        | string representation of the \_createdAt timestamp.                                                     | Date                                                                                                                                                                                  |
| updatedAt        | string representation of the \_updatedAt timestamp.                                                     | Date                                                                                                                                                                                  |
| completedAt      | string representation of the \_completedAt timestamp.                                                   | Date                                                                                                                                                                                  |

## Constructor

```javascript
new ListItem(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(content, note?)

Edit the list item.

| Properties    | Description              | Type   | Required? |
| ------------- | ------------------------ | ------ | --------- |
| content       | New content of the item. | String | true      |
| note?         | Item's additional note   | Object | false     |
| note?.content | note's content           | String | true      |

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

### delete()

Delete the list item.

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

### complete()

Set the item to 'complete'.

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

### uncomplete()

Set the item to 'uncomplete'.

> 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/listitem.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.
