new quoi and remove dot
This commit is contained in:
parent
ee0a54addf
commit
f33343a8ca
1 changed files with 3 additions and 3 deletions
6
main.py
6
main.py
|
@ -34,7 +34,7 @@ class Listener(StreamListener):
|
|||
if status._json["user"]["id"] in self.listOfFriendsID: # verification of the author of the tweet
|
||||
if seniority(status._json["created_at"]): # verification of the age of the tweet
|
||||
# recovery of the last "usable" word of the tweet
|
||||
tweetText = sub(r"https?:\/\/\S+| +?\?|\?| +?\!| ?\!|-|~|(?<=ui)i+|@\S+", "", status._json["text"].lower())
|
||||
tweetText = sub(r"https?:\/\/\S+| +?\?|\?| +?\!| ?\!|-|~|(?<=ui)i+|@\S+|\.+", "", status._json["text"].lower())
|
||||
lastWord = tweetText.split()[-1:][0]
|
||||
if lastWord in universalBase: # check if the last word found is a supported word
|
||||
if lastWord in quoiBase:
|
||||
|
@ -125,7 +125,7 @@ if __name__ == '__main__':
|
|||
errorMessage = "Error happens!" # error message
|
||||
|
||||
# words to detect
|
||||
quoiBase = ["quoi", "koi", "quoient"]
|
||||
quoiBase = ["quoi", "koi", "quoient", "q u o i"]
|
||||
ouiBase = ["oui", "ui"]
|
||||
nonBase = ["non", "nn"]
|
||||
universalBase = createBaseTrigger(quoiBase, ouiBase, nonBase)
|
||||
|
@ -135,7 +135,7 @@ if __name__ == '__main__':
|
|||
|
||||
# creation of answers
|
||||
feur = createBaseAnswers("feur")
|
||||
feur.extend(["https://twitter.com/shukuzi62/status/1422611919538724868/video/1", "feur (-isson)"]) # add a message in addition to the default answers
|
||||
feur.extend(["https://twitter.com/shukuzi62/status/1422611919538724868/video/1", "feur (-isson)", "https://twitter.com/antoinelae/status/1422943594403581957/video/1"]) # add a message in addition to the default answers
|
||||
stiti = createBaseAnswers("stiti")
|
||||
bril = createBaseAnswers("bril")
|
||||
|
||||
|
|
Reference in a new issue