2023-02-17 17:46:13 +02:00
|
|
|
from pyrogram import filters
|
|
|
|
from pyrogram.types import Message
|
2023-03-18 21:53:26 +02:00
|
|
|
from convopyro import listen_message
|
2023-02-17 17:46:13 +02:00
|
|
|
|
2023-02-17 23:59:03 +02:00
|
|
|
from classes.poster_client import PosterClient
|
2023-02-17 17:46:13 +02:00
|
|
|
from modules.app import app
|
|
|
|
|
|
|
|
|
2023-03-09 12:33:02 +02:00
|
|
|
@app.on_message(~filters.scheduled & filters.command(["import"], prefixes=["", "/"]))
|
2023-02-17 17:46:13 +02:00
|
|
|
async def cmd_import(app: PosterClient, msg: Message):
|
2023-02-17 22:55:38 +02:00
|
|
|
if msg.from_user.id in app.admins:
|
2023-03-18 21:53:26 +02:00
|
|
|
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
|
2023-02-17 17:46:13 +02:00
|
|
|
|
|
|
|
|
2023-03-09 12:33:02 +02:00
|
|
|
@app.on_message(~filters.scheduled & filters.command(["export"], prefixes=["", "/"]))
|
2023-02-17 17:46:13 +02:00
|
|
|
async def cmd_export(app: PosterClient, msg: Message):
|
2023-02-26 00:19:08 +02:00
|
|
|
if msg.from_user.id in app.admins:
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2023-03-09 12:33:02 +02:00
|
|
|
@app.on_message(~filters.scheduled & filters.command(["remove"], prefixes=["", "/"]))
|
2023-02-26 00:19:08 +02:00
|
|
|
async def cmd_remove(app: PosterClient, msg: Message):
|
|
|
|
if msg.from_user.id in app.admins:
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2023-03-09 12:33:02 +02:00
|
|
|
@app.on_message(~filters.scheduled & filters.command(["purge"], prefixes=["", "/"]))
|
2023-02-26 00:19:08 +02:00
|
|
|
async def cmd_purge(app: PosterClient, msg: Message):
|
2023-02-17 22:55:38 +02:00
|
|
|
if msg.from_user.id in app.admins:
|
2023-03-09 12:33:02 +02:00
|
|
|
pass
|