Files
PrimoWorldsBot/BotCode/routers/commands/adm_cmd/all_cmd.py

22 lines
793 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# BotCode/routers/commands/adm_cmd/all_cmd.py
#
from BotCode.utils import hidden_admins_message
from BotLibrary import CommandHandler
# Настройки экспорта в модули
__all__ = ("all_cmd",)
# Текст, который вы хотите передать по умолчанию
custom_text = "<b>Важное уведомление!</b>"
# Создание команды /all с несколькими медиа
all_cmd = CommandHandler(
name="all",
description="Всеобщий призыв",
keywords=["all", "фдд", "@all"],
callbackdata=["keywords"],
media="command",
func=[lambda message, *args: hidden_admins_message(message, msg=False, text=message.text.split(" ", 1)[1] if len(message.text.split(" ", 1)) > 1 else custom_text)],
)