add verboses

This commit is contained in:
Mylloon 2022-08-11 12:25:39 +02:00
parent 805ab1bb57
commit 43c962c3e0
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -104,8 +104,15 @@ class Listener(StreamingClient):
if not tweet.text.startswith("RT @"): if not tweet.text.startswith("RT @"):
# Cancel if author of the first tweet in the conversation is in private # Cancel if author of the first tweet in the conversation is in private
if tweet.conversation_id: if tweet.conversation_id:
if keys["VERBOSE"]:
print("Thread...", end=" ")
if self._get_user(self.client.get_tweet(id=tweet.conversation_id, tweet_fields="author_id", user_auth=True).data.author_id).protected: if self._get_user(self.client.get_tweet(id=tweet.conversation_id, tweet_fields="author_id", user_auth=True).data.author_id).protected:
if keys["VERBOSE"]:
print("Auteur du premier tweet en privé, pas de réponses.")
return return
else:
if keys["VERBOSE"]:
print("Auteur du premier tweet en publique...", end=" ")
author = self._get_user(tweet.author_id) author = self._get_user(tweet.author_id)
# Clean the tweet # Clean the tweet
lastWord = cleanTweet(tweet.text) lastWord = cleanTweet(tweet.text)