class List

A list of users.

Constructor

constructor(data, bot)

Parameters

data: ListData

List data.

bot: Bot

The active Bot instance.

Properties

name: string

The list's name.

uri: string

The list's AT URI.

cid: string

The list's CID.

purpose: string

The list's purpose.

creator?: Profile

The list's creator.

description?: string

The list's description.

descriptionFacets?: "@atcute/client/lexicons".AppBskyRichtextFacet.Main[]

Any facets associated with the list's description.

avatar?: string

The list's avatar.

items?: Profile[]

The list's members.

blockUri?: string

The AT URI of the list block record, if the bot has the list blocked.

muted?: boolean

Whether the bot has the list muted.

indexedAt?: Date

The time the list was indexed by the AppView.

Methods

fetchItems(options?)

Fetch the list's members.

Parameters

options: ListFetchItemsOptions = {}

Options for fetching list members.

Returns

Promise<Profile[]>

mute()

Mute all accounts on the list.

unmute()

Unmute all accounts on the list.

block()

Block all accounts on the list.

Returns

Promise<string>

The AT URI of the list block record.

unblock()

Unblock all accounts on the list.

getFeed(options?)

Get a feed of recent posts from accounts on the list.

Parameters

options: ListGetFeedOptions = {}

Options for fetching the feed.

Returns

Promise<{ cursor: string | undefined; posts: Post[]; }>

label(labels, comment?)

Apply labels to the list.

Parameters

labels: string[]

The labels to apply.

comment?: string

An optional comment.

negateLabels(labels, comment?)

Negate labels previously applied to the list.

Parameters

labels: string[]

The labels to negate.

comment?: string

An optional comment.

fromView(view, bot)

Constructs an instance from a ListView.

Parameters

bot: Bot

The active Bot instance.

Returns

List