.
A powerful Twitter bot that captures screenshots of tweets, registers them on the opBNB blockchain for immutable proof, and stores them on IPFS via Pinata.
- Automated Mention Monitoring: Continuously monitors Twitter mentions and responds automatically
- High-Quality Screenshot Capture: Uses Playwright for accurate tweet rendering with fallback to API-based generation
- Blockchain Verification: Registers every screenshot on opBNB (Layer 2 for BNB Smart Chain) with transaction proof
- Decentralized Storage: Uploads screenshots to IPFS via Pinata for permanent, censorship-resistant storage
- Smart Duplicate Prevention: Tracks processed mentions and parent posts to avoid spam
- Flexible Configuration: Supports both testnet and mainnet deployment
- Rate Limit Handling: Built-in cooldowns and scheduling to respect Twitter API limits
- User mentions the bot on a tweet they want to capture
- Bot captures a screenshot of the original tweet (not the mention)
- Screenshot is uploaded to IPFS via Pinata
- Proof is registered on opBNB blockchain with the IPFS CID and tweet ID
- Bot replies to the original tweet with the screenshot and blockchain transaction link
- Attribution is included: "Requested by @username" in the reply
- Python 3.8 or higher
- Twitter Developer Account with API access
- opBNB wallet with BNB for gas fees
- Pinata account for IPFS storage
- Playwright browser binaries
-
Clone the repository
git clone https://github.com/yourusername/clipx-bot.git cd clipx-bot -
Install Python dependencies
pip install -r requirements.txt
-
Install Playwright browsers
playwright install chromium
-
Configure your credentials
- Copy
config.example.pytoconfig.py - Fill in all required API keys and credentials
- See Configuration section below
- Copy
Edit the config.py file with your credentials:
TWITTER_API_KEY: Your Twitter API consumer keyTWITTER_API_SECRET: Your Twitter API consumer secretTWITTER_ACCESS_TOKEN: Your Twitter access tokenTWITTER_ACCESS_SECRET: Your Twitter access token secretTWITTER_BEARER_TOKEN: Your Twitter bearer token (required for v2 API)BOT_USERNAME: Your bot's Twitter handle (e.g., "@ClipX0_")
OPBNB_PRIVATE_KEY: Your wallet private key (keep this secure!)OPBNB_CONTRACT_ADDRESS: Your deployed smart contract addressOPBNB_USE_TESTNET: Set toTruefor testnet,Falsefor mainnet
PINATA_API_KEY: Your Pinata API keyPINATA_SECRET_API_KEY: Your Pinata secret API key
CHECK_INTERVAL_SECONDS: How often to check for mentions (default: 280)REPLY_COOLDOWN_SECONDS: Delay between replies (default: 30)MAX_MENTION_AGE_SECONDS: Ignore mentions older than this (default: 1500)QUEUE_WINDOW_SECONDS: Time window for collecting mentions (default: 300)
`
For support, please open an issue in the GitHub repository or contact @ClipX0_ on Twitter.
This bot is provided as-is. Use at your own risk. Always comply with Twitter's Automation Rules and opBNB network policies.
Built on BNBCHAIN