From 91afc539f73a8df6e5aa1212d50ed42fd4260271 Mon Sep 17 00:00:00 2001 From: PinLin Date: Wed, 23 Aug 2017 17:59:10 +0800 Subject: [PATCH] friendly split space debug message fix command bug --- bot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 5a09af1..22f27db 100644 --- a/bot.py +++ b/bot.py @@ -22,6 +22,7 @@ def on_chat(msg): print('chat_type:', chat_type) # for debug print('chat_id:', chat_id) # for debug print('from_id:', from_id) # for debug + print() # for debug # create a user object user = kuser(from_id, bot) @@ -35,7 +36,7 @@ def on_chat(msg): command = [msg['text']] if msg['text'][0] == '/': command = msg['text'].replace('_', ' ').lower().split(' ') - command = command.replace(config.NAME, '') + command[0] = command[0].replace(config.NAME, '') # first-time user if user.status == '第一次用' and chat_type == 'private':