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.
TelegramPoster/plugins/commands/mode_submit.py
Profitroll 5adb004a2a API usage overhaul (#27)
* `/report` command added
* Updated to libbot 1.5
* Moved to [PhotosAPI_Client](https://git.end-play.xyz/profitroll/PhotosAPI_Client) v0.5.0 from using self-made API client
* Video support (almost stable)
* Bug fixes and improvements

Co-authored-by: profitroll <vozhd.kk@gmail.com>
Reviewed-on: #27
2023-06-28 00:57:30 +03:00

25 lines
772 B
Python

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))