Represents a list item on Guilded.

Example

new ListItem(channel, rawItem);

Hierarchy

Constructors

Properties

channel: ListChannel
channelId: string

The ID of the channel the list item belongs to.

client: Client
completedAt?: Date

The date the list item was completed.

completedBy?: string

The ID of the user that completed the list item.

createdAt: Date

The date the list item was created.

createdBy: string

The ID of the user that created the list item.

createdByWebhookId?: string

The ID of the webhook that created the list item.

editedAt?: Date

The date the list item was edited.

editedBy?: string

The ID of the user that edited the list item.

id: string
mentions?: APIMentions

The mentions of the list item.

message: string

The message of the list item.

The note of the list item.

parentId?: string

The ID of the list item the list item belongs to.

serverId: string

The ID of the server the list item belongs to.

Accessors

  • get author(): undefined | ServerMember
  • The server member that created the list item.

    Returns undefined | ServerMember

  • get authorId(): string
  • The ID of the user that created the list item.

    Returns string

  • get completedTimestamp(): undefined | number
  • The timestamp the list item was completed.

    Returns undefined | number

  • get completer(): undefined | ServerMember
  • The server member that completed the list item.

    Returns undefined | ServerMember

  • get createdTimestamp(): number
  • The timestamp the list item was created.

    Returns number

  • get editedTimestamp(): undefined | number
  • The timestamp the list item was edited.

    Returns undefined | number

  • get editor(): undefined | ServerMember
  • The server member that edited the list item.

    Returns undefined | ServerMember

  • get isCached(): boolean
  • Whether the list item is cached.

    Returns boolean

  • get isCompleted(): boolean
  • Whether the list item is completed.

    Returns boolean

  • get isEditable(): boolean
  • Whether the list item is editable.

    Returns boolean

  • get parent(): undefined | ListItem
  • The list item the list item belongs to.

    Returns undefined | ListItem

  • get server(): undefined | Server
  • The server the list item belongs to.

    Returns undefined | Server

  • get webhook(): undefined | Webhook
  • The webhook that created the list item.

    Returns undefined | Webhook

Methods

  • Complete the list item.

    Returns

    The completed list item.

    Example

    listItem.complete();
    

    Returns Promise<ListItem>

  • Edit the list item.

    Returns

    The edited list item.

    Example

    listItem.edit('Hello World!');
    

    Parameters

    • message: string

      The message of the list item.

    • Optional note: string

      The note of the list item.

    Returns Promise<ListItem>

  • Fetch the list item.

    Returns

    The fetched list item.

    Example

    listItem.fetch();
    

    Parameters

    • Optional options: FetchOptions

      The options to fetch the list item with.

    Returns Promise<ListItem>

  • Fetch the server member that created the list item.

    Returns

    The fetched server member.

    Example

    listItem.fetchAuthor();
    

    Parameters

    • Optional options: FetchOptions

      The options to fetch the server member with.

    Returns Promise<ServerMember>

  • Fetch the server member that completed the list item.

    Returns

    The fetched server member.

    Example

    listItem.fetchCompleter();
    

    Parameters

    • Optional options: FetchOptions

      The options to fetch the server member with.

    Returns Promise<undefined | ServerMember>

  • Fetch the server member that edited the list item.

    Returns

    The fetched server member.

    Example

    listItem.fetchEditor();
    

    Parameters

    • Optional options: FetchOptions

      The options to fetch the server member with.

    Returns Promise<undefined | ServerMember>

  • Fetch the list item the list item belongs to.

    Returns

    The fetched list item.

    Example

    listItem.fetchParent();
    

    Parameters

    • Optional options: FetchOptions

      The options to fetch the list item with.

    Returns Promise<undefined | ListItem>

  • Fetch the server the list item belongs to.

    Returns

    The fetched server.

    Example

    listItem.fetchServer();
    

    Parameters

    • Optional options: FetchOptions

      The options to fetch the server with.

    Returns Promise<Server>

  • Fetch the webhook that created the list item.

    Returns

    The fetched webhook.

    Example

    listItem.fetchWebhook();
    

    Parameters

    • Optional options: FetchOptions

      The options to fetch the webhook with.

    Returns undefined | Promise<Webhook>

  • Remove the list item.

    Returns

    The removed list item.

    Example

    listItem.remove();
    

    Returns Promise<ListItem>

  • Uncomplete the list item.

    Returns

    The uncompleted list item.

    Example

    listItem.uncomplete();
    

    Returns Promise<ListItem>