From cc199c395d7851614abdda469382760c75491654 Mon Sep 17 00:00:00 2001 From: bobloy Date: Mon, 15 Mar 2021 08:16:20 -0400 Subject: [PATCH] Discord file now takes a path, so just give em a path. --- qrinvite/qrinvite.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qrinvite/qrinvite.py b/qrinvite/qrinvite.py index ab5f5dc..a91f7ab 100644 --- a/qrinvite/qrinvite.py +++ b/qrinvite/qrinvite.py @@ -96,8 +96,8 @@ class QRInvite(Cog): ) png_path: pathlib.Path = path / (ctx.guild.icon + "_qrcode.png") - with png_path.open("rb") as png_fp: - await ctx.send(file=discord.File(png_fp.read(), "qrcode.png")) + # with png_path.open("rb") as png_fp: + await ctx.send(file=discord.File(png_path, "qrcode.png")) def convert_webp_to_png(path):