Spaces:
Sleeping
Sleeping
Download Backend/pyrofork/plugins/log.py from nktforsure04org/private: direct link, hf CLI and curl.
- Browser
- Download file 725 Bytes
-
https://huggingface.co/spaces/nktforsure04org/private/resolve/main/Backend/pyrofork/plugins/log.py
- Command line
-
hf download hf://spaces/nktforsure04org/private/Backend/pyrofork/plugins/log.py
-
curl -L -o log.py https://huggingface.co/spaces/nktforsure04org/private/resolve/main/Backend/pyrofork/plugins/log.py
725 Bytes
| from pyrogram import filters, Client | |
| from pyrogram.types import Message | |
| from os import path as ospath | |
| from Backend.helper.custom_filter import CustomFilters | |
| 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}") | |