From 721d99dba3c8c280fd663c9fa8807a38728fc8ac Mon Sep 17 00:00:00 2001 From: dece Date: Sat, 31 Oct 2020 18:12:08 +0100 Subject: [PATCH] plugin: fix crash on parsing empty command --- edmond/plugin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/edmond/plugin.py b/edmond/plugin.py index 8ebf098..391dd0a 100644 --- a/edmond/plugin.py +++ b/edmond/plugin.py @@ -101,6 +101,8 @@ class Plugin: def should_handle_command(self, message, no_content=False): """Store Command in object and return True if it should handle it.""" command = self.parse_command(message, no_content=no_content) + if not command: + return False commands = self.config.get("commands", []) if ( any(command.ident == c for c in commands) or