File size: 725 Bytes
1404692
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from pyrogram import filters, Client
from pyrogram.types import Message
from os import path as ospath

from Backend.helper.custom_filter import CustomFilters

@Client.on_message(filters.command('log') & filters.private & CustomFilters.owner, group=10)
async def log(client: Client, message: Message):
    try:
        path = ospath.abspath('log.txt')
        if not ospath.exists(path):
            return await message.reply_text("> ❌ Log file not found.")
        
        await message.reply_document(
            document=path,
            quote=True,
            disable_notification=True
        )
    except Exception as e:
        await message.reply_text(f"⚠️ Error: {e}")
        print(f"Error in /log: {e}")