mirror of
https://github.com/thewesker/ebooks_example.git
synced 2025-12-20 04:11:13 -05:00
a6f32fda6e0e53d559b05ae183d4ed15e79350aa
Tweets determined as 'special' to the bot could (under a 50% chance) accidentally attempt to be favourited twice, causing a crash due to Twitter returning a Forbidden response. In this example, we add an assertion to check whether the earlier favourite has occurred, to prevent it happening again.
ebooks_example
As requested, this is the twitter_ebooks app which I use to run most of my own bots. It tweets one guaranteed tweet every 24h, always responds to interactions, and has some small unprompted interaction probability based on keyword matching.
Usage
git clone https://github.com/mispy/ebooks_example.git
cd ebooks_example
bundle install
ebooks archive username corpus/username.json
ebooks consume corpus/username.json
Populate bots.rb with your auth details, the bot username and model name, then:
./run.rb
Also runs as a Heroku app! See the twitter_ebooks README for more information.
Description
Languages
Ruby
99.7%
Procfile
0.3%