Sarenrae: Add name to ancestry image

This commit is contained in:
skins 2021-09-01 21:36:07 +01:00
parent 1505855106
commit 961c65642e

View File

@ -33,7 +33,7 @@ class Sarenrae(commands.Cog):
headers = {"Authorization": await self.conf.token()} headers = {"Authorization": await self.conf.token()}
req = requests.get(f"https://api.pathfinder2.fr/v1/pf2/ancestry?name={name}", headers=headers).json() req = requests.get(f"https://api.pathfinder2.fr/v1/pf2/ancestry?name={name}", headers=headers).json()
html = req["results"][0]["data"]["description"]["value"] html = req["results"][0]["data"]["description"]["value"]
await ctx.send(image=discord.File(image(html), filename=f"{name}.jpg")) await ctx.send(file=discord.File(image(html), filename=f"{name}.jpg"))
@commands.command() @commands.command()
@checks.is_owner() @checks.is_owner()