WIP: Photos and queue removal

This commit is contained in:
Profitroll 2023-02-25 23:19:08 +01:00
parent cf6c1f03d7
commit 88f8bb4a52
3 changed files with 18 additions and 0 deletions

View File

@ -7,6 +7,8 @@
"forwards": "Check post forwards",
"import": "Submit .zip archive with photos",
"export": "Get .zip archive with all photos",
"remove": "Delete photo by its ID",
"purge": "Completely purge bot's queue",
"reboot": "Restart the bot"
},
"message": {

View File

@ -7,6 +7,8 @@
"forwards": "Переглянути репости",
"import": "Надати боту .zip архів з фотографіями",
"export": "Отримати .zip архів з усіма фотографіями",
"remove": "Видалити фото за його ID",
"purge": "Повністю видалити всю чергу бота",
"reboot": "Перезапустити бота"
},
"message": {

View File

@ -15,5 +15,19 @@ async def cmd_import(app: PosterClient, msg: Message):
@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