An AI-powered Twitter bot that monitors and engages with tweets from specific accounts in the crypto/web3 ecosystem.
- 🤖 AI-powered responses using OpenAI GPT
- 🔄 Automatic tweet monitoring and engagement
- 💬 Smart replies and quote tweets
- 🔍 Focused monitoring of specific accounts
- 🍪 Cookie-based authentication
- ⏱️ Rate limiting and natural delays
- 🗃️ Tweet history management
- Install dependencies:
npm install
- Create a
.env
file with your credentials:
OPENAI_API_KEY=your_openai_api_key
TWITTER_USERNAME=your_twitter_username
TWITTER_PASSWORD=your_twitter_password
TWITTER_EMAIL=your_twitter_email
- Run the bot:
node twitter-bot.js
The bot can be configured by modifying the following in twitter-bot.js
:
ecosystemConfig
: List of accounts to monitorretweetKeywords
: Keywords that trigger quote tweetsactionDelay
: Delay between actions (default: 1 minute)
- Monitors specified accounts for new tweets
- Checks tweets from the last week
- Maintains tweet history to avoid duplicates
- Likes new tweets
- Generates AI-powered replies using OpenAI
- Creates quote tweets for important announcements
- Natural delays between actions to avoid rate limits
- Uses cookie-based authentication
- Saves and reuses cookies to avoid frequent logins
- Handles session management automatically
openai
: For generating AI responseselizaos
: For Twitter interaction without APIdotenv
: For environment variable managementfs
: For file system operations