This repository has been archived on 2024-08-21. You can view files and clone it, but cannot push or open issues or pull requests.
BWTAqua/plugins/commands/start.py

18 lines
553 B
Python

from pyrogram import filters
from pyrogram.types import Message
from classes.pyroclient import PyroClient
@PyroClient.on_message(
~filters.scheduled & filters.private & filters.command(["start", "welcome", "help"], prefixes=["/", ""]) # type: ignore
)
async def command_start(app: PyroClient, message: Message):
user = await app.find_user(message.from_user)
await message.reply_text(
app._("welcome", "messages", locale=user.locale).format(
notice=app._("get_number", "messages", locale=user.locale)
)
)