Sarenrae: fix permanent token storage
This commit is contained in:
parent
dd769ae19c
commit
2e8a18f36b
@ -27,7 +27,7 @@ class Sarenrae(commands.Cog):
|
||||
@commands.command()
|
||||
async def ancestry(self, ctx, *args):
|
||||
name = args[0]
|
||||
headers = {"Authorization": self.conf.pf2_token}
|
||||
headers = {"Authorization": self.conf.pf2_token()}
|
||||
req = requests.get(f"https://api.pathfinder2.fr/v1/pf2/ancestry?name={name}", headers=headers).json()
|
||||
html = req["results"][0]["data"]["description"]["value"]
|
||||
filename = f"ancestry-{name}"
|
||||
@ -40,4 +40,4 @@ class Sarenrae(commands.Cog):
|
||||
@checks.is_owner()
|
||||
async def sarenrae_token(self, ctx, *args):
|
||||
self.conf.pf2_token.set(args[0])
|
||||
return await ctx.send(f"Set token to {self.conf.pf2_token}")
|
||||
return await ctx.send(f"Set token to {self.conf.pf2_token()}")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user