Fix BytesIO reading

This commit is contained in:
Zeva Rose 2022-04-19 17:02:07 -06:00
parent a4b0ae2b79
commit 08ab641ff1

View file

@ -37,6 +37,7 @@ class BotutilCog(Scale):
with BytesIO() as file_bytes: with BytesIO() as file_bytes:
raw = await af.read_bytes() raw = await af.read_bytes()
file_bytes.write(raw) file_bytes.write(raw)
file_bytes.seek(0)
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)