Constructor
Properties
labels: ComAtprotoLabelDefs.Label[]
Labels on the user's profile.
indexedAt?: Date
The time when the user's profile was indexed by the AppView.
followUri?: string
The AT URI of the follow relationship between the bot and the user. Undefined if the bot is not following the user.
followedByUri?: string
The AT URI of the follow relationship between the bot and the user. Undefined if the user is not following the bot.
blockUri?: string
The AT URI of the block relationship between the bot and the user. Undefined if the user is not blocking the bot.
incomingChatPreference?: IncomingChatPreference
The user's preference for who can initiate a chat conversation.
Methods
getPosts(options?)
Fetch the user's posts (up to 100 at a time, default 100).
Parameters
options: BotGetUserPostsOptions = {}
Optional configuration.
getLikedPosts(options?)
Fetch the user's liked posts (up to 100 at a time, default 100).
Parameters
options: BotGetUserLikesOptions = {}
Optional configuration.
getLists(options?)
Fetch the user's lists (up to 100 at a time, default 100).
Parameters
options: BotGetUserListsOptions = {}
Optional configuration.
getStarterPacks(options?)
Fetch the user's starter packs (up to 25 at a time, default 25).
Parameters
options: BotGetUserStarterPacksOptions = {}
getLabeler()
Fetch the labeler associated with the user, if there is any. Check the isLabeler property before calling this method!
getMessages(cursor?)
Fetch the message history between the bot and this user.
Parameters
cursor?: string
The cursor to begin fetching from.
Returns
Promise<{ cursor: string | undefined; messages: ChatMessage | DeletedChatMessage[]; }>
An array of messages and a cursor for pagination.
sendMessage(payload)
Send the user a direct message.
Parameters
payload: Omit<ChatMessagePayload, "conversationId">
The message to send.
Returns
Promise<ChatMessage>
labelAccount(labels, comment?)
Apply labels to the user's account. Note that this will label the user's profile and all posts they create! If you only want to label their profile, use the labelProfile method.
Parameters
labels: string[]
The labels to apply.
comment?: string
An optional comment to attach to the label.
negateAccountLabels(labels, comment?)
Negate labels previously applied to the user's account.
Parameters
labels: string[]
The labels to negate.
comment?: string
An optional comment to attach.
labelProfile(labels, comment?)
Apply labels to the user's profile only. If you wish to apply an account-level label that will also appear on all posts the user creates, use the labelAccount method. Note that you need a running Ozone instance to publish labels!
Parameters
labels: string[]
The labels to apply.
comment?: string
An optional comment to attach to the label.
negateProfileLabels(labels, comment?)
Negate labels previously applied to the user's profile.
Parameters
labels: string[]
The labels to negate.
comment?: string
An optional comment to attach.
fromView(view, bot)
Constructs an instance from a ProfileView.
Parameters
view: "@atcute/client/lexicons".AppBskyActorDefs.ProfileView | "@atcute/client/lexicons".AppBskyActorDefs.ProfileViewBasic | "@atcute/client/lexicons".AppBskyActorDefs.ProfileViewDetailed | "@atcute/client/lexicons".ChatBskyActorDefs.ProfileViewBasic
The ProfileView to construct from.
bot: Bot
The active Bot instance.