/Twitter-Bot

A Python script that acts as a Twitter bot and performs automated actions on Twitter, such as posting tweets, retweeting, liking tweets, replying to mentions, and following users.

Primary LanguagePythonMIT LicenseMIT

Twitter Bot

A Python script that acts as a Twitter bot and performs automated actions on Twitter, such as posting tweets, retweeting, liking tweets, replying to mentions, and following users.

Features

  • Retweeting: The bot searches for tweets containing a specified keyword and retweets them if they haven't been retweeted before.
  • Liking: The bot searches for tweets containing a specified keyword and likes them if they haven't been liked before.
  • Replying to Mentions: The bot checks for mentions and replies to the users who mentioned it with a predefined tweet.
  • Following Users: The bot follows the users who mentioned it if it's not already following them.
  • Posting Tweets: The bot posts a tweet with the content provided by the user.

Prerequisites

  • Python 3.x
  • Tweepy library (pip install tweepy)

Usage

  1. Clone the repository:
git clone https://github.com/your_username/twitter-bot.git
  1. Install the required dependencies:
pip install tweepy
  1. Fill in the Twitter API credentials in the script:
consumer_key = "YOUR_CONSUMER_KEY"
consumer_secret = "YOUR_CONSUMER_SECRET"
access_token = "YOUR_ACCESS_TOKEN"
access_token_secret = "YOUR_ACCESS_TOKEN_SECRET"
  1. Run the script:
python bot.py
  1. Follow the prompts to enter the keyword to search for, the tweet content, and let the bot perform automated actions on Twitter.

Note: Make sure to replace the placeholders (YOUR_CONSUMER_KEY, YOUR_CONSUMER_SECRET, YOUR_ACCESS_TOKEN, YOUR_ACCESS_TOKEN_SECRET) with your own Twitter API credentials.

Customization

  • You can modify the script to add more features or customize the existing ones based on your requirements.
  • Adjust the rate limit compliance by changing the time.sleep() intervals after each action.

Disclaimer

Please use this script responsibly and ensure that your actions comply with the Twitter API's terms of service. Be cautious about the usage limits and avoid spamming or violating any Twitter policies.

License

This project is licensed under the MIT License.

Feel free to further customize the README.md file based on your preferences or add any additional information you find relevant.