Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. @bot.command(command=['rbnspots'])
  2. async def rbn(ctx, *, msg : str = ''):
  3. '''RBN Graphs, thanks to Fabian Kurz, DJ1YFK '''
  4. with ctx.typing():
  5. async with aiohttp.ClientSession() as session:
  6. async with session.get('https://foc.dj1yfk.de/activity/image/{call}.png') as resp:
  7. if resp.status != 200:
  8. return await ctx.send('Could not download file...')
  9. data = io.BytesIO(await resp.read())
  10. await ctx.send(file=discord.File(data, 'rbn.png'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement