We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99ac169 commit cf14ecdCopy full SHA for cf14ecd
src/watcher.py
@@ -57,8 +57,11 @@ def is_this_tweet_sent(self, text: str) -> bool:
57
58
def post_left_units_tweet(self, time: int, unit: str, units: str):
59
tweet = self.create_text(time, units if time > 1 else unit)
60
- self.api_helper.post_tweet(tweet)
61
- log(f"-> Tweet Sent: \"{tweet}\"")
+ if not self.is_this_tweet_sent(tweet):
+ self.api_helper.post_tweet(tweet)
62
+ log(f"-> Tweet Sent: \"{tweet}\"")
63
+ else:
64
+ log(f"-> Tweet Already Exists: \"{tweet}\"")
65
66
def post_watch_ended_tweet(self):
67
self.api_helper.post_tweet(WATCH_END_TEXT)
0 commit comments