From 8010535b95e368458f125ec1992c2d1035facce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Deuchnord?= Date: Sun, 5 Sep 2021 15:22:46 +0200 Subject: [PATCH] Fix commands being invoked without the prefix --- _twitchbot/config.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/_twitchbot/config.py b/_twitchbot/config.py index 451457b..7134627 100644 --- a/_twitchbot/config.py +++ b/_twitchbot/config.py @@ -148,8 +148,10 @@ class Config: ) def find_command(self, command: str) -> Union[None, Command]: - if command.startswith(self.command_prefix): - command = command[1:] + if not command.startswith(self.command_prefix): + return None + + command = command[1:] for c in self.commands: if c.name == command or command in c.aliases: