Constructor
Properties
indexedAt?: Date
The time when the user's profile was indexed by the AppView.
followUri?: ResourceUri
The AT URI of the follow relationship between the bot and the user. Undefined if the bot is not following the user.
followedByUri?: ResourceUri
The AT URI of the follow relationship between the bot and the user. Undefined if the user is not following the bot.
blockUri?: ResourceUri
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.
iteratePosts(options?)
Iterate over the user's posts.
Parameters
options: BotGetUserPostsOptions = {}
Returns
AsyncIterableIterator<Post, any, any>
getLikedPosts(options?)
Fetch the user's liked posts (up to 100 at a time, default 100).
Parameters
options: BotGetUserLikesOptions = {}
Optional configuration.
iterateLikedPosts(options?)
Iterate over the user's liked posts.
Parameters
options: BotGetUserLikesOptions = {}
Returns
AsyncIterableIterator<Post, any, any>
getLists(options?)
Fetch the user's lists (up to 100 at a time, default 100).
Parameters
options: BotGetUserListsOptions = {}
Optional configuration.
iterateLists(options?)
Iterate over the user's lists.
Parameters
options: BotGetUserListsOptions = {}
Returns
AsyncIterableIterator<List, any, any>
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; 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.
Returns
Promise<ModEventView>
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.
Returns
Promise<ModEventView>
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.
Returns
Promise<ModEventView>
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.