From c266fd4ce339388b84d6fe71e79f25019f44def9 Mon Sep 17 00:00:00 2001 From: krk Date: Wed, 11 May 2016 21:08:45 +0300 Subject: [PATCH] telepot API 2.0 is supported. --- servstatsbot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servstatsbot.py b/servstatsbot.py index 3a31222..3b7267b 100644 --- a/servstatsbot.py +++ b/servstatsbot.py @@ -54,7 +54,7 @@ def plotmemgraph(memlist, xaxis, tmperiod): class YourBot(telepot.Bot): def handle(self, msg): - content_type, chat_type, chat_id = telepot.glance2(msg) + content_type, chat_type, chat_id = telepot.glance(msg) # Do your stuff according to `content_type` ... # print(chat_id) if chat_id in adminchatid: # Store adminchatid variable in tokens.py @@ -151,7 +151,7 @@ def handle(self, msg): TOKEN = telegrambot bot = YourBot(TOKEN) -bot.notifyOnMessage() +bot.message_loop() tr = 0 xx = 0 # Keep the program running.