def listener(messages):
"""
When new messages arrive TeleBot will call this function.
"""
for m in messages:
if m.content_type == 'text':
# print the sent message to the console
print (str(m.chat.first_name) + " [" + str(m.chat.id) + "]: " + m.text)
评论列表
文章目录