Added display typing while generating image for iss
This commit is contained in:
parent
e62e2c252f
commit
bfe7f5835d
@ -536,6 +536,7 @@ class Utils:
|
||||
|
||||
@commands.command(name='iss')
|
||||
async def iss_loc(self, ctx):
|
||||
async with ctx.typing():
|
||||
async with self.bot.aio_session.get('https://api.wheretheiss.at/v1/satellites/25544') as response:
|
||||
iss_loc = await response.json()
|
||||
|
||||
@ -549,7 +550,6 @@ class Utils:
|
||||
plt.text(x, y, ' ISS', fontsize=20, color='red')
|
||||
|
||||
with BytesIO() as output:
|
||||
async with ctx.typing():
|
||||
plt.savefig(output, format='png', transparent=True)
|
||||
output.seek(0)
|
||||
await ctx.send(file=discord.File(output, 'output.png'))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user