From 3dce020a6573773839af780093b0c33d826e2b9d Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Fri, 2 Feb 2024 12:44:22 -0500 Subject: [PATCH] fix(bible): fixed keyerror in get_version --- bible/bible.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bible/bible.py b/bible/bible.py index 6670ddb..ebd1870 100644 --- a/bible/bible.py +++ b/bible/bible.py @@ -66,9 +66,9 @@ class Bible(commands.Cog): raise bible.errors.ServiceUnavailable() return Version( data["data"]["abbreviation"], - data["data"]["language"], + data["data"]["language"]["name"], data["data"]["abbreviationLocal"], - data["data"]["languageLocal"], + data["data"]["language"]["nameLocal"], data["data"]["copyright"], ) @@ -278,7 +278,9 @@ class Bible(commands.Cog): description=passage["content"].replace("ΒΆ ", ""), color=await self.bot.get_embed_color(ctx.channel), ) - embed.set_footer(text=f"{ctx.prefix}bible random - Powered by API.Bible - {version.abbreviationLocal}") + embed.set_footer( + text=f"{ctx.prefix}bible random - Powered by API.Bible - {version.abbreviationLocal}" + ) await ctx.send(embed=embed) else: await ctx.send(f"## {passage['reference']}\n{passage['content']}")