Обработчик команды /secret
This commit is contained in:
@@ -7,6 +7,9 @@ from BotLibrary import *
|
||||
|
||||
# Создание роутера и настройка экспорта модулей
|
||||
__all__ = ("router",)
|
||||
|
||||
from routers.msg_default import msg_default
|
||||
|
||||
router = Router(name="secret_message_router")
|
||||
log_type = "Admin"
|
||||
|
||||
@@ -16,12 +19,13 @@ keywords = ["secret", "секрет", "ыускуе", "ctrhtn",
|
||||
|
||||
|
||||
# Обработчик команды /secret или сообщений с текстом из списка keywords
|
||||
@router.message(F.from_user.id.in_(ListId.important_ids),
|
||||
Command(*keywords, prefix=BotEdit.prefixs, ignore_case=True))
|
||||
@router.message(F.from_user.id.in_(ListId.important_ids), F.text.lower().in_(keywords))
|
||||
@router.message(F.from_user.id.func(lambda user_id: str(user_id) in DataID.important.keys()),
|
||||
Command(*keywords, prefix=BotVariables.prefixs, ignore_case=True))
|
||||
@router.message(F.from_user.id.func(lambda user_id: str(user_id) in DataID.important.keys()),
|
||||
F.text.lower().in_(keywords))
|
||||
async def secret_admin_message(message: types.Message):
|
||||
text = f"Привет, <b>важная персона</b>!"
|
||||
await message.reply(text)
|
||||
|
||||
await cmd_logginger(message, log_type, text)
|
||||
return text
|
||||
await msg_default(message)
|
||||
|
||||
Reference in New Issue
Block a user