diff --git a/chat_listener.py b/chat_listener.py index 8102820..567de2d 100644 --- a/chat_listener.py +++ b/chat_listener.py @@ -33,10 +33,14 @@ class TwitchBot(commands.Bot): async def event_message(self, message: TwitchIOMessage): """Runs every time a message is sent in chat.""" - # The 'echo' check is temporarily disabled to allow self-messaging for testing. - # if message.echo: - # return # Ignore messages sent by the bot itself - + # This is CRITICAL when overriding a listener in commands.Bot + # to ensure the bot can still process commands if any are added. + await super().event_message(message) + + # Ignore messages sent by the bot itself to prevent loops. + if message.echo: + return + # Prepare the message data to be sent to the frontend chat_data = { "author": message.author.name,