From 257c4186d1dc47451cc27d59c92fd34257f83991 Mon Sep 17 00:00:00 2001 From: Pin Lin Date: Thu, 30 Nov 2017 00:25:59 +0800 Subject: [PATCH] add some comment --- bot.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bot.py b/bot.py index 8a43595..90d170d 100644 --- a/bot.py +++ b/bot.py @@ -19,6 +19,8 @@ users = {} def on_chat(msg): content_type, chat_type, chat_id = telepot.glance(msg) from_id = msg['from']['id'] + + # debug message pprint(msg) print('content_type:', content_type) print('chat_type:', chat_type) @@ -34,10 +36,7 @@ def on_chat(msg): users[str(from_id)] = user # just want to know - try: - print('student_id:', user._username) - except: - pass + print('student_id:', user._username) if content_type == 'text': # pre-treat the command