From d7ef281a52acac7f2e19b3b074df1abf29dcad7c Mon Sep 17 00:00:00 2001 From: PinLin Date: Thu, 24 Aug 2017 17:24:51 +0800 Subject: [PATCH] ping pong --- bot.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bot.py b/bot.py index fceb45c..6d0e1fb 100644 --- a/bot.py +++ b/bot.py @@ -75,6 +75,11 @@ def on_chat(msg): time.sleep(1) os._exit(0) + elif command[0] == '/ping': + bot.sendMessage(chat_id, "*PONG*", + parse_mode='Markdown', + reply_to_message_id=msg['message_id']) + elif chat_type == 'private': if command[0] == '/help' or command[0] == '幫助📚': if user.check_online() == True: