Skip to content

A bot that comments on tweets containing a specified keyword. The bot uses the OpenAI API to generate comments and the Twitter API to post them. It is designed to run continuously, with a fixed delay between each comment.

License

Notifications You must be signed in to change notification settings

sojinsamuel/Twitter-Comment-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tweet Twitter Comment Bot

This Twitter Comment bot comments on tweets containing a specified keyword. The bot uses the OpenAI API to generate comments and the Twitter API to post them. It is designed to run continuously, with a fixed delay between each comment.

🧑‍💻 Technologies used

  • Node.js
  • Axios
  • twit
  • Twitter API
  • OpenAI API

🦾 How it works

  • The bot uses the Twitter API to search for tweets containing the specified keyword.
  • For each tweet found, the bot uses the OpenAI API to generate a comment.
  • The bot then uses the Twitter API to post the generated comment as a reply to the tweet.
  • The bot waits for a fixed amount of time before searching for new tweets again.

👿 Requirements

  • A Twitter developer account and API keys (with elevated access)
  • An OpenAI API key

🚀 Deploying to Heroku

The bot can be easily deployed to Heroku to run 24/7. Follow the steps in the Heroku documentation to set up a Heroku account, create a new app, and deploy the code. Don't forget to set up the environment variables in the Heroku app's settings.

Could you please spread the word through Twitter ➡️ Tweet

💻 Unlock full potential of Twitter Comment Bot with Professional Assistance

I am glad to make this bot available for you to use, If you need help in setting this up on AWS or Heroku, I am willing to assist you. However, please note that this service comes at a cost.

Project Notice

⚠️ Warning: This project uses Twitter API v1, which is now deprecated.

Starting from now, all bots must be developed using the Twitter API v2.

I can help you migrate your project to the new API. Feel free to contact me here for assistance.

To verify this deprecation and learn more, please visit this link.