Fixed match word condition
This commit is contained in:
4
bot.py
4
bot.py
@@ -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
4
build.sh
Executable 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
|
||||
14
config.json
14
config.json
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user