bots: Strip leading whitespaces from bot queries.

This commit is contained in:
derAnfaenger 2017-05-23 04:01:04 +02:00 committed by Tim Abbott
parent e74714f6ac
commit 2e298d89ab
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ def run_message_handler_for_bot(lib_module, quiet, config_file):
if start_with_mention is None: if start_with_mention is None:
return None return None
query_without_mention = message['content'][len(start_with_mention.group()):] query_without_mention = message['content'][len(start_with_mention.group()):]
return query_without_mention return query_without_mention.lstrip()
def is_private(message, client): def is_private(message, client):
# bot will not reply if the sender name is the same as the bot name # bot will not reply if the sender name is the same as the bot name