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", "forwards": "Check post forwards",
"import": "Submit .zip archive with photos", "import": "Submit .zip archive with photos",
"export": "Get .zip archive with all photos", "export": "Get .zip archive with all photos",
"remove": "Delete photo by its ID",
"purge": "Completely purge bot's queue",
"reboot": "Restart the bot" "reboot": "Restart the bot"
}, },
"message": { "message": {

View File

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

View File

@ -17,3 +17,17 @@ async def cmd_export(app: PosterClient, msg: Message):
if msg.from_user.id in app.admins: if msg.from_user.id in app.admins:
pass 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