From 476215312be180d922b20b8d4fe8e0555e8a925c Mon Sep 17 00:00:00 2001 From: Sheldon Lee Date: Fri, 18 Sep 2020 16:58:59 +0000 Subject: [PATCH] Fixed error when message contains only image. --- command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command.py b/command.py index 3e97a0a..c7135d3 100644 --- a/command.py +++ b/command.py @@ -21,7 +21,7 @@ class Command: @staticmethod def getCommand(string): words = Command.__getWords(string); - if words[0].startswith(Command.command_prefix): + if words[0].startswith(Command.command_prefix) and len(words) >= 0: return words[0][1:] return ""