Read log bytes instead of log string

This commit is contained in:
Zeva Rose 2022-04-19 16:59:57 -06:00
parent ce9dda8239
commit 8f0872b304

View file

@ -35,7 +35,7 @@ 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:
raw = await af.read() raw = await af.read_bytes()
file_bytes.write(raw) 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)