Download Backend/pyrofork/plugins/log.py from dhyeye/streamio: direct link, hf CLI and curl.
- Browser
- Download file 770 Bytes
-
https://huggingface.co/spaces/dhyeye/streamio/resolve/main/Backend/pyrofork/plugins/log.py
- Command line
-
hf download hf://spaces/dhyeye/streamio/Backend/pyrofork/plugins/log.py
-
curl -L -o log.py https://huggingface.co/spaces/dhyeye/streamio/resolve/main/Backend/pyrofork/plugins/log.py
770 Bytes
| from os import path as ospath | |
| from pyrogram import Client, filters | |
| from pyrogram.types import Message | |
| from Backend.helper.custom_filter import CustomFilters | |
| from Backend.logger import LOGGER | |
| #----- Owner-only /log: send the log file as a document | |
| 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}") | |
| LOGGER.error(f"Error in /log: {e}") | |