39 lines
1.2 KiB
Python
39 lines
1.2 KiB
Python
from pyrogram import filters
|
|
from pyrogram.types import Message
|
|
from convopyro import listen_message
|
|
|
|
from classes.poster_client import PosterClient
|
|
from modules.app import app
|
|
|
|
|
|
@app.on_message(~filters.scheduled & filters.command(["import"], prefixes=["", "/"]))
|
|
async def cmd_import(app: PosterClient, msg: Message):
|
|
if msg.from_user.id in app.admins:
|
|
print("Listening to file...", flush=True)
|
|
answer = await app.listen.Message(
|
|
filters.document, id=filters.user(msg.from_user.id), timeout=None
|
|
)
|
|
if answer is None:
|
|
return
|
|
print("Gotcha", flush=True)
|
|
await answer.reply_text("Gotcha")
|
|
return
|
|
|
|
|
|
@app.on_message(~filters.scheduled & filters.command(["export"], prefixes=["", "/"]))
|
|
async def cmd_export(app: PosterClient, msg: Message):
|
|
if msg.from_user.id in app.admins:
|
|
pass
|
|
|
|
|
|
@app.on_message(~filters.scheduled & filters.command(["remove"], prefixes=["", "/"]))
|
|
async def cmd_remove(app: PosterClient, msg: Message):
|
|
if msg.from_user.id in app.admins:
|
|
pass
|
|
|
|
|
|
@app.on_message(~filters.scheduled & filters.command(["purge"], prefixes=["", "/"]))
|
|
async def cmd_purge(app: PosterClient, msg: Message):
|
|
if msg.from_user.id in app.admins:
|
|
pass
|