Fix error in log command

This commit is contained in:
Zeva Rose 2022-04-19 16:58:42 -06:00
parent 03d08dd16c
commit a038930fd5

View file

@ -35,8 +35,8 @@ class BotutilCog(Scale):
async with AIOFile("jarvis.log", "r") as af: async with AIOFile("jarvis.log", "r") as af:
with BytesIO() as file_bytes: with BytesIO() as file_bytes:
async for chunk in af.read(8192): raw = await af.read()
file_bytes.write(chunk) file_bytes.write(raw)
log = File(file_bytes, file_name="jarvis.log") log = File(file_bytes, file_name="jarvis.log")
await ctx.reply(content="Here's the latest log", file=log) await ctx.reply(content="Here's the latest log", file=log)