add some comment
This commit is contained in:
5
bot.py
5
bot.py
@ -19,6 +19,8 @@ users = {}
|
|||||||
def on_chat(msg):
|
def on_chat(msg):
|
||||||
content_type, chat_type, chat_id = telepot.glance(msg)
|
content_type, chat_type, chat_id = telepot.glance(msg)
|
||||||
from_id = msg['from']['id']
|
from_id = msg['from']['id']
|
||||||
|
|
||||||
|
# debug message
|
||||||
pprint(msg)
|
pprint(msg)
|
||||||
print('content_type:', content_type)
|
print('content_type:', content_type)
|
||||||
print('chat_type:', chat_type)
|
print('chat_type:', chat_type)
|
||||||
@ -34,10 +36,7 @@ def on_chat(msg):
|
|||||||
users[str(from_id)] = user
|
users[str(from_id)] = user
|
||||||
|
|
||||||
# just want to know
|
# just want to know
|
||||||
try:
|
|
||||||
print('student_id:', user._username)
|
print('student_id:', user._username)
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
if content_type == 'text':
|
if content_type == 'text':
|
||||||
# pre-treat the command
|
# pre-treat the command
|
||||||
|
Reference in New Issue
Block a user