fix(bible): fixed keyerror in get_version

This commit is contained in:
Seaswimmer 2024-02-02 12:44:22 -05:00
parent 3813d3de02
commit 3dce020a65
Signed by: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -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']}")