From db75fa9003097362cb6ef9c7bcf27a0fadaf1d07 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 5 Aug 2021 17:04:20 +0200 Subject: [PATCH] Adding name of bot in log --- main.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/main.py b/main.py index 3ef492d..61a3a08 100644 --- a/main.py +++ b/main.py @@ -129,6 +129,16 @@ def main(accessToken: str, accessTokenSecret: str, consumerKey: str, consumerSec api = API(auth_handler = auth, wait_on_rate_limit = True) + if keys["VERBOSE"]: + try: + api.verify_credentials() + print(f"Authentification réussie en tant que", end = " ") + except: + print("Erreur d'authentification.") + exit(1) + + print(f"@{api.me()._json['screen_name']}.") + listener = Listener(api, users) stream = Stream(auth = api.auth, listener = listener)