BAN_WORDS deprecated
This commit is contained in:
@@ -51,7 +51,6 @@ LIB = types.InlineKeyboardButton("📚 Книги", url="https://telegra.ph/what
|
||||
|
||||
|
||||
NON_GRATA = {"дудар", "хауди", "dudar"}
|
||||
BAN_WORDS = {"GREEN", "TONCOIN", "казино", "🍋", "Выплаты", "🎰"}
|
||||
|
||||
ZEN = [
|
||||
"Beautiful is better than ugly.",
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@ from urllib.request import urlopen
|
||||
from telebot import types
|
||||
|
||||
from .constants import (
|
||||
NON_GRATA, ADMIN_ID, ONLY_RUS_LETTERS, ONLY_ENG_LETTERS, RULES_TEXT, SYMBOLS, BAN_WORDS
|
||||
NON_GRATA, ADMIN_ID, ONLY_RUS_LETTERS, ONLY_ENG_LETTERS, RULES_TEXT, SYMBOLS
|
||||
)
|
||||
from .models import session, BadWord
|
||||
|
||||
@@ -73,7 +73,7 @@ def is_in_not_allowed(word_list: list, msg: str) -> bool:
|
||||
|
||||
|
||||
def is_ban_words_in_caption(caption: str) -> bool:
|
||||
return any(ban_word in caption for ban_word in BAN_WORDS)
|
||||
return is_spam(caption)
|
||||
|
||||
|
||||
def is_nongrata(type_message: types.Message) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user