anonymousx97 31d19bc48b v2.5.0:Upstream with Private Repo.
What's New:
- Sort Plugins into their respective folders.
- download, upload, rename commands.
- Help Docstrings.
- Proper Logging.
- rename .exec cmd to .py
2024-01-08 16:01:41 +05:30

15 lines
418 B
Python

import aiofiles
from app import BOT, bot
from app.core import Message
@bot.add_cmd(cmd="logs")
async def read_logs(bot: BOT, message: Message):
async with aiofiles.open("logs/app_logs.txt", "r") as aio_file:
text = await aio_file.read()
if len(text) < 4050:
await message.reply(f"<pre language=bash>{text}</pre>")
else:
await message.reply_document(document="logs/app_logs.txt")