28 lines
738 B
Python
28 lines
738 B
Python
from pyrogram import filters
|
|
from pyrogram.client import Client
|
|
from pyrogram.types import Message
|
|
|
|
from classes.pyroclient import PyroClient
|
|
|
|
|
|
@Client.on_message(~filters.scheduled & filters.command(["start"], prefixes="/"))
|
|
async def cmd_start(app: PyroClient, msg: Message):
|
|
user = await app.find_user(msg.from_user)
|
|
|
|
if user.banned:
|
|
return
|
|
|
|
await msg.reply_text(app._("start", "message", locale=user.locale))
|
|
|
|
|
|
@Client.on_message(
|
|
~filters.scheduled & filters.command(["rules", "help"], prefixes="/")
|
|
)
|
|
async def cmd_rules(app: PyroClient, msg: Message):
|
|
user = await app.find_user(msg.from_user)
|
|
|
|
if user.banned:
|
|
return
|
|
|
|
await msg.reply_text(app._("rules", "message", locale=user.locale))
|