How thurpe/x_autoreply_bot works
This is a Node.js Twitter support-and-engagement bot with separate v1.1 and v2 implementations. Its main workflow polls Twitter for DMs and mentions, generates FAQ replies, tags messages by priority, responds through Twitter, and tracks processed and tagged messages in memory. Operators can inspect prioritized messages and trigger actions through management endpoints; scheduled jobs provide periodic checks and update tweets where enabled. The README documents both API versions and these product capabilities; the v1.1 source excerpt is partial, so uncertain scheduling links are omitted.
Main entry points: index.js DM handling · twitterClientv2.js v2 client · twitterClient.js v1.1 client · index-v2.js v2 bot
Components 18
Message handling
- DM handling
index.js - Mention handling
index.js - FAQ responses
index.js - Priority tagging
index.js - Message tracking
index.js
Management and scheduling
- Management API
index.js - v2 management API
index-v2.js - Priority listing
index.js - Scheduled jobs
index-v2.js - Tweet sending
index.js - v2 scheduled tweet
index-v2.js
Twitter integration
- v1.1 client
twitterClient.js - v2 client
twitterClientv2.js
Other components
- Customer
- Operator
- Twitter API
Connections 40
- Customer → Twitter API: sends messages
- v1.1 bot → DM handling: dispatches
- v1.1 bot → Mention handling: dispatches
- DM handling → v1.1 client: requests DMs
- Mention handling → v1.1 client: requests mentions
- v1.1 client → Twitter API: calls API
- Twitter API → DM handling: returns DMs
- Twitter API → Mention handling: returns mentions
- DM handling → FAQ responses: generates reply
- Mention handling → FAQ responses: generates reply
- DM handling → Priority tagging: tags message
- Mention handling → Priority tagging: tags message
- DM handling → v1.1 client: sends reply
- Mention handling → v1.1 client: posts reply
- DM handling → Message tracking: tracks processing
- Mention handling → Message tracking: tracks processing
- Operator → Management API: calls endpoints
- Management API → Priority listing: requests listing
- Priority listing → Message tracking: reads tags
- Management API → Message tracking: marks resolved
- Management API → DM handling: triggers check
- Management API → Mention handling: triggers check
- Management API → Tweet sending: requests tweet
- Tweet sending → v1.1 client: posts tweet
- Operator → v2 management API: calls endpoints
- v2 management API → Message tracking: reads or updates
- v2 bot → DM handling: dispatches
- v2 bot → Mention handling: dispatches
- DM handling → v2 client: requests DMs
- Mention handling → v2 client: requests mentions
- v2 client → Twitter API: calls API
- Twitter API → v2 client: returns data
- v2 client → Twitter API: sends replies
- Scheduled jobs → DM handling: dispatches checks
- Scheduled jobs → Mention handling: dispatches checks
- Scheduled jobs → v2 scheduled tweet: dispatches tweet
- v2 scheduled tweet → v2 client: posts tweet
- v2 bot → Priority tagging: tags messages
- v2 bot → FAQ responses: generates replies
- v2 bot → Message tracking: tracks processing