diff --git a/sarenrae/sarenrae.py b/sarenrae/sarenrae.py index 0b11a84..fecc3ff 100644 --- a/sarenrae/sarenrae.py +++ b/sarenrae/sarenrae.py @@ -27,7 +27,7 @@ class Sarenrae(commands.Cog): @commands.command() async def ancestry(self, ctx, *args): name = args[0] - headers = {"Authorization": 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() html = req["results"][0]["data"]["description"]["value"] filename = f"ancestry-{name}" @@ -39,7 +39,5 @@ class Sarenrae(commands.Cog): @commands.command() @checks.is_owner() async def sarenrae_token(self, ctx, *args): - for arg in args: - await ctx.send(arg) - self.conf.token.set(args[0]) - return await ctx.send(f"Set token to {self.conf.token()}") + await self.conf.token.set(args[0]) + return await ctx.send(f"Set token to {await self.conf.token()}")