fix(bible): ruff fixes
This commit is contained in:
parent
5c5a2f28b2
commit
7f2a81e350
2 changed files with 19 additions and 19 deletions
|
@ -27,7 +27,7 @@ class Bible(commands.Cog):
|
|||
|
||||
__author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"]
|
||||
__git__ = "https://www.coastalcommits.com/cswimr/SeaCogs"
|
||||
__version__ = "1.1.2"
|
||||
__version__ = "1.1.3"
|
||||
__documentation__ = "https://seacogs.coastalcommits.com/pterodactyl/"
|
||||
|
||||
def __init__(self, bot: Red):
|
||||
|
@ -97,14 +97,14 @@ class Bible(commands.Cog):
|
|||
if response.status == 503:
|
||||
raise bible.errors.ServiceUnavailableError()
|
||||
return Version(
|
||||
bible_id,
|
||||
data["data"]["abbreviation"],
|
||||
data["data"]["language"]["name"],
|
||||
data["data"]["abbreviationLocal"],
|
||||
data["data"]["language"]["nameLocal"],
|
||||
data["data"]["description"],
|
||||
data["data"]["descriptionLocal"],
|
||||
data["data"]["copyright"],
|
||||
bible_id=bible_id,
|
||||
abbreviation=data["data"]["abbreviation"],
|
||||
language=data["data"]["language"]["name"],
|
||||
abbreviation_local=data["data"]["abbreviationLocal"],
|
||||
language_local=data["data"]["language"]["nameLocal"],
|
||||
description=data["data"]["description"],
|
||||
description_local=data["data"]["descriptionLocal"],
|
||||
version_copyright=data["data"]["copyright"],
|
||||
)
|
||||
|
||||
async def _get_passage(
|
||||
|
@ -270,7 +270,7 @@ class Bible(commands.Cog):
|
|||
description=passage["content"].replace("¶ ", ""),
|
||||
color=await ctx.embed_color(),
|
||||
)
|
||||
embed.set_footer(text=f"{ctx.prefix}bible passage - Powered by API.Bible - {version.abbreviationLocal} ({version.languageLocal}, {version.descriptionLocal})", icon_url="attachment://icon.png")
|
||||
embed.set_footer(text=f"{ctx.prefix}bible passage - Powered by API.Bible - {version.abbreviation_local} ({version.language_local}, {version.description_local})", icon_url="attachment://icon.png")
|
||||
await ctx.send(embed=embed, file=icon)
|
||||
else:
|
||||
await ctx.send(f"## {passage['reference']}\n{passage['content']}")
|
||||
|
@ -309,7 +309,7 @@ class Bible(commands.Cog):
|
|||
description=passage["content"].replace("¶ ", ""),
|
||||
color=await ctx.embed_color(),
|
||||
)
|
||||
embed.set_footer(text=f"{ctx.prefix}bible random - Powered by API.Bible - {version.abbreviationLocal} ({version.languageLocal}, {version.descriptionLocal})", icon_url="attachment://icon.png")
|
||||
embed.set_footer(text=f"{ctx.prefix}bible random - Powered by API.Bible - {version.abbreviation_local} ({version.language_local}, {version.description_local})", icon_url="attachment://icon.png")
|
||||
await ctx.send(embed=embed, file=icon)
|
||||
else:
|
||||
await ctx.send(f"## {passage['reference']}\n{passage['content']}")
|
||||
|
|
|
@ -4,23 +4,23 @@ class Version:
|
|||
bible_id,
|
||||
abbreviation,
|
||||
language,
|
||||
abbreviationLocal,
|
||||
languageLocal,
|
||||
abbreviation_local,
|
||||
language_local,
|
||||
description,
|
||||
descriptionLocal,
|
||||
description_local,
|
||||
version_copyright,
|
||||
):
|
||||
self.bible_id = bible_id
|
||||
self.abbreviation = abbreviation
|
||||
self.language = language
|
||||
self.abbreviationLocal = abbreviationLocal
|
||||
self.languageLocal = languageLocal
|
||||
self.abbreviation_local = abbreviation_local
|
||||
self.language_local = language_local
|
||||
self.description = description
|
||||
self.descriptionLocal = descriptionLocal
|
||||
self.description_local = description_local
|
||||
self.copyright = version_copyright
|
||||
|
||||
def __str__(self):
|
||||
return self.abbreviationLocal
|
||||
return self.abbreviation_local
|
||||
|
||||
def __repr__(self):
|
||||
return f'bible.models.Version("{self.bible_id}", "{self.abbreviation}", "{self.language}", "{self.abbreviationLocal}", "{self.languageLocal}", "{self.description}", "{self.descriptionLocal}", "{self.copyright}")'
|
||||
return f'bible.models.Version("{self.bible_id}", "{self.abbreviation}", "{self.language}", "{self.abbreviation_local}", "{self.language_local}", "{self.description}", "{self.description_local}", "{self.copyright}")'
|
||||
|
|
Loading…
Add table
Reference in a new issue