Skip to content

Commit

Permalink
Merge pull request #74 from tmellon/twitter/actions
Browse files Browse the repository at this point in the history
Update twitter_actions.py
  • Loading branch information
ef95023 authored Jan 13, 2025
2 parents e26a230 + 8752cc8 commit 9b6e32e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/actions/twitter_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ def post_tweet(agent, **kwargs):

if ("last_tweet_time" not in agent.state):
last_tweet_time = 0
else:
last_tweet_time = agent.state["last_tweet_time"]

if current_time - last_tweet_time >= agent.tweet_interval:
agent.logger.info("\n📝 GENERATING NEW TWEET")
Expand Down Expand Up @@ -91,4 +93,4 @@ def like_tweet(agent, **kwargs):
return True
else:
agent.logger.info("\n👀 No tweets found to like...")
return False
return False

0 comments on commit 9b6e32e

Please sign in to comment.