diff --git a/bible/bible.py b/bible/bible.py index 7801349..a4fd727 100644 --- a/bible/bible.py +++ b/bible/bible.py @@ -38,7 +38,7 @@ class Bible(commands.Cog): async def _get_passage(self, bible_id: str, passage_id: str) -> dict: """Get a Bible passage from the API.bible API.""" url = f"https://api.scripture.api.bible/v1/bibles/{bible_id}/passages/{passage_id}" - headers = self.bot.get_shared_api_tokens("api.bible") + headers = await self.bot.get_shared_api_tokens("api.bible") async with self.session.get(url, headers=headers) as response: data = await response.json() return data["data"] @@ -51,7 +51,7 @@ class Bible(commands.Cog): async def _get_books(self, bible_id: str) -> dict: """Get the books of the Bible from the API.bible API.""" url = f"https://api.scripture.api.bible/v1/bibles/{bible_id}/books" - headers = self.bot.get_shared_api_tokens("api.bible") + headers = await self.bot.get_shared_api_tokens("api.bible") async with self.session.get(url, headers=headers) as response: data = await response.json() return data["data"] @@ -59,7 +59,7 @@ class Bible(commands.Cog): async def _get_chapters(self, bible_id: str, book_id: str) -> dict: """Get the chapters of a book of the Bible from the API.bible API.""" url = f"https://api.scripture.api.bible/v1/bibles/{bible_id}/books/{book_id}/chapters" - headers = self.bot.get_shared_api_tokens("api.bible") + headers = await self.bot.get_shared_api_tokens("api.bible") async with self.session.get(url, headers=headers) as response: data = await response.json() return data["data"] @@ -67,7 +67,7 @@ class Bible(commands.Cog): async def _get_verses(self, bible_id: str, book_id: str, chapter: int) -> dict: """Get the verses of a chapter of a book of the Bible from the API.bible API.""" url = f"https://api.scripture.api.bible/v1/bibles/{bible_id}/books/{book_id}/chapters/{chapter}/verses" - headers = self.bot.get_shared_api_tokens("api.bible") + headers = await self.bot.get_shared_api_tokens("api.bible") async with self.session.get(url, headers=headers) as response: data = await response.json() return data["data"]