class PostReference

A reference to a post.

Constructor

constructor(data, bot)

Parameters

data: PostReferenceData

Data used to construct the reference.

bot: Bot

The active Bot instance.

Properties

uri: string

The post's AT URI.

cid: string

The post's CID.

replyRef?: ReplyRef

A reference to the post's parent and root post.

Methods

fetch()

Fetch the full referenced post.

Returns

Promise<Post>

reply(payload, options?)

Reply to the post.

Parameters

payload: PostPayload

The post payload.

options: BotPostOptions = {}

Optional configuration.

Returns

Promise<PostReference>

A reference to the created post.

quote(payload, options?)

Create a new post with this post quoted.

Parameters

payload: PostPayload

The post payload.

options: BotPostOptions = {}

Optional configuration.

Returns

Promise<PostReference>

A reference to the created post.

like()

Like the post.

unlike()

Unlike the post.

repost()

Repost the post.

deleteRepost()

If this post has been reposted, delete the repost.

delete()

Delete the post.