From 81cd41da17c811f5e2b20bd9bfc467d248a16be8 Mon Sep 17 00:00:00 2001 From: derAnfaenger Date: Tue, 23 May 2017 04:01:04 +0200 Subject: [PATCH] bots: Strip leading whitespaces from bot queries. --- contrib_bots/bot_lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib_bots/bot_lib.py b/contrib_bots/bot_lib.py index 83999c1..264914e 100644 --- a/contrib_bots/bot_lib.py +++ b/contrib_bots/bot_lib.py @@ -88,7 +88,7 @@ def run_message_handler_for_bot(lib_module, quiet, config_file): if start_with_mention is None: return None query_without_mention = message['content'][len(start_with_mention.group()):] - return query_without_mention + return query_without_mention.lstrip() def is_private(message, client): # bot will not reply if the sender name is the same as the bot name