https://github.com/djcopley/twitterbot
A TwitterBot that replies to people automatically when they @ you.
https://github.com/djcopley/twitterbot
api bot cleverbot python3 twitter twitter-bot
Last synced: 3 months ago
JSON representation
A TwitterBot that replies to people automatically when they @ you.
- Host: GitHub
- URL: https://github.com/djcopley/twitterbot
- Owner: djcopley
- License: mit
- Created: 2018-04-11T19:27:08.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-12-08T22:20:25.000Z (over 4 years ago)
- Last Synced: 2025-04-03T12:57:33.090Z (3 months ago)
- Topics: api, bot, cleverbot, python3, twitter, twitter-bot
- Language: Python
- Size: 42 KB
- Stars: 0
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TwitterBot
A simple program that replies to tweets. Response is generated using the CleverBot API.
# Usage
TwitterBot requires one positional argument to run, your twitter handle. Make sure to include the '@'
symbol.Example: `python3 twitter_bot.py @yourhandle` or `./twitter_bot.py @yourhandle`
### Program Arguments
usage: Twitter Bot [-h] [-r] [-q] [-l {0,1,2}] twitter_handle
positional arguments:
twitter_handle your twitter @handle
optional arguments:
-h, --help show this help message and exit
-r, --reply_to_thread toggles reply to thread where mentioned
-q, --quiet disables console output of non-errors
-l {0,1,2}, --log {0,1,2} change logging levelLogging Levels
- 0 : logging is disabled (default)
- 1 : errors and critical failures are logged
- 2 : in addition, tweets (incoming and outgoing) are logged***Note**: if the account tweeting you is private, TwitterBot will not reply.*
# Installation
Generate API keys for [Twitter](https://apps.twitter.com) and [CleverBot](https://www.cleverbot.com/api/)
Find the credentials.py file and paste your credentials into the empty fields:
class Twitter:
CONSUMER_KEY = ''
CONSUMER_SECRET = ''
ACCESS_TOKEN_KEY = ''
ACCESS_TOKEN_SECRET = ''
class CleverBot:
API_KEY = ''Install Dependencies: `pip3 install python-twitter CleverWrap`