1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-26 04:54:22 +00:00

fix what i have broken

This commit is contained in:
Steffo 2023-12-17 06:19:26 +01:00
parent 2ef532bee8
commit 109b7f5973
Signed by: steffo
GPG key ID: 2A24051445686895
2 changed files with 3 additions and 2 deletions

View file

@ -86,8 +86,8 @@ async def cat(*, _msg: engi.Message, **__):
log.debug("Reading image bytes into memory") log.debug("Reading image bytes into memory")
while img_data := await response.content.read(8192): while img_data := await response.content.read(8192):
img.write(img_data) img.write(img_data)
img.seek(0)
with path.open("rb") as img:
log.debug("Sending image in the chat") log.debug("Sending image in the chat")
await _msg.reply(files=[img]) await _msg.reply(files=[img])

View file

@ -36,6 +36,7 @@ async def dog_any(*, _msg: engi.Message, **__):
with path.open("wb") as img: with path.open("wb") as img:
img.write(await response.content.read()) img.write(await response.content.read())
with path.open("rb") as img:
await _msg.reply(files=[img]) await _msg.reply(files=[img])
path.unlink() path.unlink()