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?: 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 App View.

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[]; }>

fromView(view, bot)

Constructs an instance from a ListView.

Parameters

view: AppBskyGraphDefs.ListView | AppBskyGraphDefs.ListViewBasic

The ListView to construct from.

bot: Bot

The active Bot instance.

Returns

List