add word
This commit is contained in:
parent
86b661c9c9
commit
76fffd0269
1 changed files with 12 additions and 5 deletions
17
main.py
17
main.py
|
@ -107,22 +107,26 @@ class Listener(StreamingClient):
|
|||
if tweet.id != tweet.conversation_id:
|
||||
if keys["VERBOSE"]:
|
||||
print("Thread...", end=" ")
|
||||
base_tweet = self.client.get_tweet(id=tweet.conversation_id, tweet_fields="author_id", user_auth=True).data
|
||||
base_tweet = self.client.get_tweet(
|
||||
id=tweet.conversation_id, tweet_fields="author_id", user_auth=True).data
|
||||
# Sometimes Twitter don't give what we want
|
||||
if hasattr(base_tweet, 'author_id'):
|
||||
base_author = self._get_user(base_tweet.author_id)
|
||||
# Check if account is in private mode
|
||||
if base_author.protected:
|
||||
if keys["VERBOSE"]:
|
||||
print("Auteur du premier tweet en privé, pas de réponses.")
|
||||
print(
|
||||
"Auteur du premier tweet en privé, pas de réponses.")
|
||||
return
|
||||
else:
|
||||
if keys["VERBOSE"]:
|
||||
print("Auteur du premier tweet en publique...", end=" ")
|
||||
print(
|
||||
"Auteur du premier tweet en publique...", end=" ")
|
||||
else:
|
||||
# Can't check the status of the first tweet in the thread, ignoring for safety
|
||||
if keys["VERBOSE"]:
|
||||
print("Impossible de vérifier le status de l'auteur du fil.")
|
||||
print(
|
||||
"Impossible de vérifier le status de l'auteur du fil.")
|
||||
return
|
||||
else:
|
||||
# Can't check if we're in a thread or not
|
||||
|
@ -471,7 +475,10 @@ if __name__ == "__main__":
|
|||
"oui": createBaseAnswers("stiti")
|
||||
+ createBaseAnswers("fi"),
|
||||
|
||||
"non": createBaseAnswers("bril"),
|
||||
"non": createBaseAnswers("bril")
|
||||
+ [
|
||||
"bril (-liant)"
|
||||
],
|
||||
|
||||
"nan": createBaseAnswers("cy"),
|
||||
|
||||
|
|
Reference in a new issue