Lsposed_Modules_Updates_Tra.../plugins/force_push.py

22 lines
747 B
Python
Raw Permalink Normal View History

2022-11-06 06:42:31 +00:00
from pyrogram import Client, filters
from pyrogram.types import Message
from ci import admin_id
from defs.source import from_keyword_to_module
from defs.track import push_module_to_channel
@Client.on_message(filters.incoming & filters.private & filters.chat(admin_id) &
filters.command(["force_push"]))
async def force_push(_: Client, message: Message):
if len(message.command) != 2:
await message.reply_text("Usage: /force_push <app_name>")
return
data = " ".join(message.command[1:])
module = from_keyword_to_module(data)
if not module:
await message.reply_text("Not found this app.")
return
await push_module_to_channel(module)
await message.reply("Force push OK!")