Post Tweet Action

Implements

Constructors

Properties

Constructors

Properties

argsSchema: ZodObject<
    { tweet: ZodString },
    "strip",
    ZodTypeAny,
    { tweet: string },
    { tweet: string },
> = PostTweetInput

Schema for validating action arguments

description: string = POST_TWEET_PROMPT

A description of what the action does

func: (client: TwitterApi, args: { tweet: string }) => Promise<string> = postTweet

The function to execute for this action

Type declaration

    • (client: TwitterApi, args: { tweet: string }): Promise<string>
    • Posts a tweet on Twitter (X).

      Parameters

      • client: TwitterApi

        The Twitter (X) client used to authenticate with.

      • args: { tweet: string }

        The input arguments for the action.

      Returns Promise<string>

      A message indicating the success or failure of the tweet posting.

name: string = "post_tweet"

The name of the action.