Packages › trotsky › StepDeletePost
StepDeletePost class
Represents a step for deleting a specific post.
Signature:
typescript
export declare class StepDeletePost<P = StepPost, C extends StepPostOutput = StepPostOutput, O = null> extends Step<P, C, O>Extends: Step<P, C, O>
Example 1
Delete a specific post:
ts
await Trotsky.init(agent)
.post("at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3l6oveex3ii2l")
.delete()
.run()Example 2
Delete posts matching criteria:
ts
await Trotsky.init(agent)
.actor("myhandle.bsky.social")
.posts()
.take(10)
.each()
.when((step) => step?.context?.record?.text?.includes("#delete"))
.delete()
.wait(2000)
.run()Methods
Method | Modifiers | Description |
|---|---|---|
Applies the step logic to delete the post provided in the context. |