Fix false positives.

main
t 1 year ago
parent d52f13dfde
commit ffead28bd4

@ -41,7 +41,9 @@ bot = telebot.TeleBot(db['token'])
from re import search, match
def is_bad(word, bad):
res = search(bad, word)
# Agressive mode, causes false positives
#res = search(bad, word)
res = match(bad, word)
if res is not None:
return True
else:
@ -78,8 +80,13 @@ def catch_edited_messages(message):
catch(message)
'''
while True:
try:
bot.polling()
except KeyboardInterrupt:
exit()
except:
pass
'''
bot.polling()

Loading…
Cancel
Save