AI-reply-tweets bot in any language.
I wrote this bot to make artificial intelligence more accessible to all people. Using a language model, I built a bot that responds to random tweets. Every 20 minutes, the bot responds to a trending tweet. Simply reply to the tweet with the word interesting, tag the bot, and the bot will respond on its own within a few minutes. You can use it in any language, so why not? :)
Run the following line in the terminal: pip install -r requirements.txt
.
Insert your tokens in the config.py file or edit the usr.cfg file.
Create a .cfg file named user.cfg
based off .user.cfg.example
.
The configuration file consists of the following fields:
- api_key - Twitter API key generated in the Binance account setup stage.
- api_secret_key - Binance secret key generated in the Binance account setup stage.
- t_api_key - Twitter API key generated in the twitter developer portal.
- t_api_key_secret - Twitter API secret-key generated in the twitter developer portal.
- t_access_token - Twitter API access token generated in the twitter developer portal.
- t_access_token_secret - Twitter API secret-access token generated in the twitter developer portal.
- t_user_name - Twitter username of the authenticator user.
- openai_api_key - OPENAI API key generated in the openai website.
- telegram_api_key - Telegram API key generated in the telegram website. (for notification only)
Apprise allows the bot to send notifications to all of the most popular notification services available such as: Telegram, Discord, Slack, Amazon SNS, Gotify, etc.
To set this up you need to create a apprise.yml file in the config directory.
There is an example version of this file to get you started.
If you are interested in running a Telegram bot, more information can be found at Telegram's official documentation.
python -m twitter_bot
The bot structure is heavily aided by binance-trade-bot which you may find in here: watch this repo