fix get string of the list

This commit is contained in:
Mylloon 2021-08-04 13:56:05 +02:00
parent 1ba9cdf55c
commit 1495f24ab2

View file

@ -32,7 +32,7 @@ class Listener(StreamListener):
if seniority(status._json["created_at"]):
tweetText = sub(r'https?:\/\/\S+| +?\?|\?| +?\!| ?\!|-|~', '', status._json["text"])
if status._json["user"]["id"] in self.listOfFriendsID:
lastWord = tweetText.split()[-1:].lower()
lastWord = tweetText.split()[-1:][0].lower()
if lastWord in universalBase:
try:
if lastWord in quoiBase: