Fixed responding to the same message multiple times when one message handler has multiple successful triggers
This commit is contained in:
1
bot.py
1
bot.py
@@ -101,6 +101,7 @@ class MessageHandler:
|
||||
for response in self.responses:
|
||||
response.respond(message)
|
||||
handled = True
|
||||
break
|
||||
|
||||
return handled
|
||||
|
||||
|
||||
@@ -131,6 +131,24 @@
|
||||
"text": "Stop annoying yourself."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "pieces"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"text": "peices"
|
||||
}
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Put. It. Together."
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user