fix(bible): fixed bible verses being returned as html
Some checks failed
Actions / Lint Code (Pylint) (push) Failing after 15s
Actions / Build Documentation (MkDocs) (push) Successful in 11s

This commit is contained in:
Seaswimmer 2024-02-01 17:56:41 -05:00
parent a14ec9bceb
commit 894b1a3714
Signed by: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -39,7 +39,8 @@ class Bible(commands.Cog):
"""Get a Bible passage from the API.bible API."""
url = f"https://api.scripture.api.bible/v1/bibles/{bible_id}/passages/{passage_id}"
headers = await self.bot.get_shared_api_tokens("api.bible")
async with self.session.get(url, headers=headers) as response:
query = {"content_type": "text", "include-chapter-numbers": False, "include-verse-numbers": False, "include-verse-spans": False}
async with self.session.get(url, headers=headers, params=query) as response:
data = await response.json()
return data["data"]