ListItem
Represents a list item
Hierarchy
Base<string>↳
ListItem
Table of contents
Constructors
Properties
- _data
- channelID
- client
- completedAt
- completedBy
- createdAt
- createdBy
- createdByWebhookID
- id
- mentions
- message
- parentListItemID
- serverID
- updatedAt
- updatedBy
Accessors
Methods
Constructors
constructor
• new ListItem(data, client)
Create a new ListItem
Parameters
| Name | Type | Description |
|---|---|---|
data | RawListItem | The raw data of the list item |
client | Client | The client |
Overrides
Defined in
lib/structures/ListItem.ts:126
Properties
_data
• Private _data: RawListItem
The raw data of the list item
Defined in
channelID
• channelID: string
The ID of the channel the list item is in
Defined in
client
• client: Client
The bot client
Inherited from
Defined in
completedAt
• Optional completedAt: Date
The date the list item was completed at
Defined in
completedBy
• Optional completedBy: string
The ID of the user who completed the list item
Defined in
createdAt
• Optional createdAt: Date
The date the list item was created at
Defined in
createdBy
• createdBy: string
The ID of the user who created the list item
Defined in
createdByWebhookID
• Optional createdByWebhookID: string
The ID of the webhook that created the list item
Defined in
id
• id: string
The ID of the item
Inherited from
Defined in
mentions
• Optional mentions: Mentions
The mentions in the list item
Defined in
message
• message: string
The message of the list item
Defined in
parentListItemID
• Optional parentListItemID: string
The ID of the parent list item
Defined in
lib/structures/ListItem.ts:104
serverID
• serverID: string
The ID of the server the list item is in
Defined in
lib/structures/ListItem.ts:109
updatedAt
• Optional updatedAt: Date
The date the list item was updated at
Defined in
lib/structures/ListItem.ts:114
updatedBy
• Optional updatedBy: string
The ID of the user who updated the list item
Defined in
lib/structures/ListItem.ts:119
Accessors
member
• get member(): ServerMember | Promise<ServerMember>
The member the list item is in
Returns
ServerMember | Promise<ServerMember>
Defined in
lib/structures/ListItem.ts:148
note
• get note(): ListItemNote
The note of the list item
Returns
Defined in
lib/structures/ListItem.ts:160
Methods
complete
▸ complete(): Promise<void>
Complete the list item
Returns
Promise<void>
Defined in
lib/structures/ListItem.ts:177
delete
▸ delete(): Promise<void>
Delete the list item
Returns
Promise<void>
Defined in
lib/structures/ListItem.ts:185
edit
▸ edit(options): Promise<ListItem>
Edit the list item
Parameters
| Name | Type | Description |
|---|---|---|
options | ListItemOptions | The options to edit the list item with |
Returns
Promise<ListItem>
Defined in
lib/structures/ListItem.ts:194
toJSON
▸ toJSON(): ListItemData
Returns the JSON representation of the item
Returns
Overrides
Defined in
lib/structures/ListItem.ts:198
uncomplete
▸ uncomplete(): Promise<void>
Uncomplete the list item
Returns
Promise<void>
Defined in
lib/structures/ListItem.ts:220
update
▸ Protected update(data): void
Parameters
| Name | Type |
|---|---|
data | RawListItem |
Returns
void