diff --git a/antimat.py b/antimat.py index bc9a004..f17b91c 100644 --- a/antimat.py +++ b/antimat.py @@ -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()