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:
parent
2ef532bee8
commit
109b7f5973
2 changed files with 3 additions and 2 deletions
|
@ -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])
|
||||||
|
|
||||||
|
|
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue