From 37a1e6a85c19f721f6412105b9252ef418dc92f1 Mon Sep 17 00:00:00 2001 From: Kumi Date: Thu, 9 Nov 2023 12:30:12 +0100 Subject: [PATCH] Fix handling of commands in GPTBot class --- src/gptbot/classes/bot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gptbot/classes/bot.py b/src/gptbot/classes/bot.py index 101d17d..e3aae8f 100644 --- a/src/gptbot/classes/bot.py +++ b/src/gptbot/classes/bot.py @@ -321,9 +321,9 @@ class GPTBot: ) if event.body.startswith("* "): - event.body = event.body[2:] - - command = event.body.split()[1] if event.body.split()[1:] else None + command = event.body[2:].split()[1] if event.body.split()[1:] else None + else: + command = event.body.split()[1] if event.body.split()[1:] else None await COMMANDS.get(command, COMMANDS[None])(room, event, self)