Fixed match word condition

This commit is contained in:
2026-02-27 18:25:32 -05:00
parent 4012da20c3
commit 7095c60ebc
3 changed files with 22 additions and 0 deletions

4
bot.py
View File

@@ -44,6 +44,10 @@ class MatchWordCondition(MessageCondition):
if word == self.text:
return True
processed_condition = process_string(self.text, False, self.filter_case, self.filter_punctuation)
if processed_condition in processed:
return True
return False
class AndCondition(MessageCondition):

4
build.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/env bash
sudo docker build . -f /home/scarzehd/Documents/dev/sc_annoy_bot/Dockerfile --tag git.scarzehd.com/scarzehd/sc_annoy_bot
sudo docker push git.scarzehd.com/scarzehd/sc_annoy_bot

View File

@@ -181,6 +181,20 @@
"text": "https://tenor.com/view/nothing-ever-happens-nothing-look-at-the-time-nothing-clock-nothing-ever-happens-clock-gif-4518983960573307132"
}
]
},
{
"conditions": [
{
"type": "match_word",
"text": "I am the one who"
}
],
"responses": [
{
"type": "text",
"text": "https://tenor.com/view/explaining-talking-speed-i-am-the-danger-skyler-gif-19043411"
}
]
}
]
}