From fcc4e715eedb78be07673df202a4eb9f1e52831b Mon Sep 17 00:00:00 2001 From: BhasherBEL Date: Mon, 29 May 2023 16:58:15 +0200 Subject: [PATCH] Update to 0.16.0 --- main.py | 5 ++++- requirements.txt | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index c0fc9f5..cd38ef4 100644 --- a/main.py +++ b/main.py @@ -20,12 +20,15 @@ def load_creds(): if not os.path.exists('/data/token'): client = TgtgClient(email=os.environ.get('TGTG_EMAIL')) + print('Waiting for credentials ...') credentials = client.get_credentials() with open('/data/token', 'w') as file: file.write(str(credentials)) + print('Credentials stored in file') else: with open('/data/token', 'r') as file: credentials = json.loads(file.read().replace('\'', '"')) + print('Credentials loaded from file') client = TgtgClient(**credentials) bot = telegram.Bot(os.environ['TELEGRAM_TOKEN']) @@ -85,6 +88,6 @@ async def main(): time.sleep(60) if __name__ == '__main__': - check_env() + print('Check environ:', check_env()) load_creds() asyncio.run(main()) diff --git a/requirements.txt b/requirements.txt index 3ec87d0..4a536d0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ # Tested versions. Upgrade at your own risks -tgtg==0.15.0 -python-telegram-bot==20.2 \ No newline at end of file +tgtg==0.16.0 +python-telegram-bot==20.2