From 83edd36d6b28a9b35641cab2d1b2771d7f6f7f78 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Fri, 2 Feb 2024 01:48:58 -0500 Subject: [PATCH] fix(bible): don't use fums on an api route that doesn't support it --- bible/bible.py | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/bible/bible.py b/bible/bible.py index 41a20ec..08d490c 100644 --- a/bible/bible.py +++ b/bible/bible.py @@ -107,16 +107,12 @@ class Bible(commands.Cog): """Get the books of the Bible from the API.bible API.""" url = f"https://api.scripture.api.bible/v1/bibles/{bible_id}/books" headers = await self.bot.get_shared_api_tokens("api.bible") - params = { - "fums-version": "3", - } - async with self.session.get(url, headers=headers, params=params) as response: + async with self.session.get(url, headers=headers) as response: data = await response.json() self.logger.debug( - "_get_books executed with a response code of: %s\nURL: %s\n%s", + "_get_books executed with a response code of: %s\n%s", response.status, - response.url, json.dumps(data), ) if response.status == 401: @@ -125,23 +121,7 @@ class Bible(commands.Cog): raise bible.errors.BibleAccessError() if response.status == 503: raise bible.errors.ServiceUnavailable() - - fums_url = "https://fums.api.bible/f3" - fums_params = { - "t": data["meta"]["fumsToken"], - "dId": "discord-" + str(self.bot.user.id), - "sId": "discord-" + str(ctx.message.created_at.timestamp()), - "uId": ctx.author.id, - } - - async with self.session.get(fums_url, params=fums_params) as response: - fums_data = await response.json() - self.logger.debug( - "_get_books FUMS executed with a response code of: %s\n%s", - response.status, - json.dumps(fums_data), - ) - return data["data"] + return data["data"] async def _get_chapters( self, ctx: commands.Context, bible_id: str, book_id: str