def cat(self, ctx):
with ctx.channel.typing():
with aiohttp.ClientSession() as session:
async with session.get("http://random.cat/meow") as r:
r = await r.read()
url = json.JSONDecoder().decode(r.decode("utf-8"))["file"]
await ctx.send(embed=discord.Embed(title="Random Cat").set_image(url=url).set_footer(text="Powered by random.cat"))
评论列表
文章目录