From 7b3a130c912856ab5ece2a6e0519e6df0cfe011a Mon Sep 17 00:00:00 2001 From: Dustin Pianalto Date: Thu, 3 May 2018 13:00:53 -0800 Subject: [PATCH] Moved sending iss image into tpe --- exts/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exts/utils.py b/exts/utils.py index 2efb04e..ddf88d6 100644 --- a/exts/utils.py +++ b/exts/utils.py @@ -550,12 +550,12 @@ class Utils: img = BytesIO() plt.savefig(img, format='png', transparent=True) img.seek(0) - self.bot.loop.create_task(ctx.send('Current ISS Location', file=discord.File(output, 'output.png'))) + self.bot.loop.create_task(ctx.send('Current ISS Location', file=discord.File(img, 'output.png'))) async with ctx.typing(): async with self.bot.aio_session.get('https://api.wheretheiss.at/v1/satellites/25544') as response: loc = await response.json() - output = await self.bot.loop.run_in_executor(self.bot.tpe, gen_image, loc) + await self.bot.loop.run_in_executor(self.bot.tpe, gen_image, loc) # TODO Create Help command