Sarenrae: Add name to ancestry image
This commit is contained in:
parent
1505855106
commit
961c65642e
@ -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()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user