|
|
|
@ -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()
|
|
|
|
|