From 41030d5499b994a248053882aeb84abb70a942a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20M=C3=BCller?= Date: Wed, 6 Jan 2016 19:56:30 +0100 Subject: [PATCH] fix for messages only containing whitespaces --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 631d82a..2555fcb 100644 --- a/bot.py +++ b/bot.py @@ -45,7 +45,7 @@ class Bot(): args = message.strip().split(" ") cmd = args.pop(0) - if cmd[0] == '\\': + if len(cmd) > 0 and cmd[0] == '\\': try: self.call(cmd[1:], args) except KeyError: