Logging usage of /applications

This commit is contained in:
Profitroll 2022-12-16 15:04:42 +01:00
parent 11da9de887
commit de4126b1a3

View File

@ -3,6 +3,7 @@ from uuid import uuid1
from app import app, isAnAdmin from app import app, isAnAdmin
from pyrogram import filters from pyrogram import filters
from pyrogram.enums.chat_action import ChatAction from pyrogram.enums.chat_action import ChatAction
from modules.logging import logWrite
from modules.utils import should_quote, jsonSave from modules.utils import should_quote, jsonSave
from modules.database import col_applications from modules.database import col_applications
@ -11,6 +12,7 @@ from modules.database import col_applications
async def cmd_applications(app, msg): async def cmd_applications(app, msg):
if await isAnAdmin(msg.from_user.id) is True: if await isAnAdmin(msg.from_user.id) is True:
logWrite(f"Admin {msg.from_user.id} requested export of a database")
await app.send_chat_action(msg.chat.id, ChatAction.UPLOAD_DOCUMENT) await app.send_chat_action(msg.chat.id, ChatAction.UPLOAD_DOCUMENT)
filename = uuid1() filename = uuid1()
output = [] output = []