Packages › trotsky › StepPostReply
StepPostReply class
Represents a step for replying to a specific post.
Signature:
export declare class StepPostReply<P = StepPost, C extends StepPostOutput = StepPostOutput, O extends StepPostReplyOutput = StepPostReplyOutput> extends Step<P, C, O>Extends: Step<P, C, O>
Example 1
Reply to a specific post:
await Trotsky.init(agent)
.post("at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3l6oveex3ii2l")
.reply({ text: "Great post! 👍" })
.run()Example 2
Reply to posts mentioning pizza:
await Trotsky.init(agent)
.searchPosts({ q: "pizza" })
.take(3)
.each()
.reply({ text: "🍕 Pizza party! 🍕" })
.wait(1000)
.run()Constructors
Constructor | Modifiers | Description |
|---|---|---|
Initializes the StepPostReply instance with the given agent, parent, and reply record parameters. |
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
The record containing the reply parameters, which can be resolved dynamically at runtime. |
Methods
Method | Modifiers | Description |
|---|---|---|
Applies the step logic to create a reply to the post provided in the context. The resulting URI and CID of the reply are stored in the output. | ||
Clones the current step and returns a new instance with the same parameters. | ||
Resolves the query parameters for the reply, including reply references and creation time. | ||
Constructs the reply parameters for the post, including parent and root references. |