Skip to content

Commit

Permalink
Adding the first tweet out, to make sure things are working.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonGoring committed Oct 20, 2021
1 parent d7f4dea commit a973b66
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions neotomabot.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
access_token_key=twitstuff['access_token_key'],
access_token_secret=twitstuff['access_token_secret'])

def twitterup(api):
line = "Someone just restarted me by pushing to GitHub. This means I've been updated, yay!"
api.request('statuses/update', {'status':line})

def randomtweet(api):
""" Tweet a random statement from a plain text document. Passing in the twitter API object.
The tweets are all present in the file `resources/cannedtweets.txt`. These can be edited
Expand Down Expand Up @@ -68,6 +72,7 @@ def self_identify_hub(api):
line = 'This twitter bot for the Neotoma Paleoecological Database is programmed in #python and publicly available through an MIT License on GitHub: https://github.com/NeotomaDB/neotomabot'
api.request('statuses/update', {'status':line})

twitterup(api)

schedule.every(6).hours.do(recentsite, api)
schedule.every(5).hours.do(randomtweet, api)
Expand Down

0 comments on commit a973b66

Please sign in to comment.