Context handling implemented

This commit is contained in:
2023-08-30 14:41:34 +02:00
parent c91d7f3afa
commit 57ff7b6765
16 changed files with 54 additions and 14 deletions

View File

@@ -4,12 +4,14 @@ from pyrogram import filters
from pyrogram.types import Message
from classes.pyroclient import PyroClient
from modules import custom_filters
@PyroClient.on_message(
~filters.scheduled
& filters.private
& filters.command(["shutdown", "reboot", "restart"], prefixes=["/"]) # type: ignore
& filters.command(["shutdown", "reboot", "restart"], prefixes=["/"])
& ~custom_filters.context # type: ignore
)
async def command_shutdown(app: PyroClient, msg: Message):
if msg.from_user.id == app.owner: