From d9be667dfd24219908e4842415473418eac7df5d Mon Sep 17 00:00:00 2001 From: Jauhien Leaniuk <59206490+UngeheurenUngeziefer@users.noreply.github.com> Date: Tue, 23 Jun 2020 19:44:00 +0300 Subject: [PATCH] Update Telegram_poster.py --- Telegram_poster.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Telegram_poster.py b/Telegram_poster.py index 13c63a5..13b9ca4 100644 --- a/Telegram_poster.py +++ b/Telegram_poster.py @@ -22,7 +22,9 @@ chat_id = '-1001200942722' # creating list of addresses to all imgs -def img_path(): +def img_path(message): + content_type, chat_type, chat_id_console = telepot.glance(message) + print(content_type, chat_type, chat_id_console) path = 'C:/Users/sewer/MyPython/Pepe_project/downloads' img_list = [] addresses_list = [] @@ -40,4 +42,10 @@ def img_path(): print('Too Many Requests') continue -img_path() +MessageLoop(PosterBot, img_path).run_as_thread() +print('Listening ...') + +while 1: + sleep(10) + +