Add filename to file

This commit is contained in:
Zeva Rose 2021-06-26 20:33:30 -06:00
parent aaab30fb8f
commit a3551dd02b

View file

@ -67,7 +67,7 @@ class ImageCog(commands.Cog):
new_img = cv2.resize(img, (width, height)) new_img = cv2.resize(img, (width, height))
buffer = cv2.imencode(".png", new_img)[1].tobytes() buffer = cv2.imencode(".png", new_img)[1].tobytes()
bufio = BytesIO(buffer) bufio = BytesIO(buffer)
await ctx.send(file=File(bufio)) await ctx.send(file=File(bufio, filename="resized.png"))
def setup(bot): def setup(bot):