from pyrogram import filters from pyrogram.client import Client from pyrogram.types import Message from classes.pyroclient import PyroClient from classes.user import PosterUser @Client.on_message(~filters.scheduled & filters.command(["start"], prefixes="/")) async def cmd_start(app: PyroClient, msg: Message): if PosterUser(msg.from_user.id).is_blocked(): return await msg.reply_text(app._("start", "message", locale=msg.from_user.language_code)) @Client.on_message( ~filters.scheduled & filters.command(["rules", "help"], prefixes="/") ) async def cmd_rules(app: PyroClient, msg: Message): if PosterUser(msg.from_user.id).is_blocked(): return await msg.reply_text(app._("rules", "message", locale=msg.from_user.language_code))