From d1a434ce2ba0cb6273cafb6574de3de986a13584 Mon Sep 17 00:00:00 2001 From: scarzehd Date: Thu, 4 Dec 2025 01:03:58 -0500 Subject: [PATCH] Fixed responding to the same message multiple times when one message handler has multiple successful triggers --- bot.py | 1 + example_config.json => config.json | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) rename example_config.json => config.json (89%) diff --git a/bot.py b/bot.py index b07e5c8..9770262 100644 --- a/bot.py +++ b/bot.py @@ -101,6 +101,7 @@ class MessageHandler: for response in self.responses: response.respond(message) handled = True + break return handled diff --git a/example_config.json b/config.json similarity index 89% rename from example_config.json rename to config.json index e21527f..612c213 100644 --- a/example_config.json +++ b/config.json @@ -131,6 +131,24 @@ "text": "Stop annoying yourself." } ] + }, + { + "conditions": [ + { + "type": "text", + "text": "pieces" + }, + { + "type": "text", + "text": "peices" + } + ], + "responses": [ + { + "type": "text", + "text": "Put. It. Together." + } + ] } ] } \ No newline at end of file