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)"]
|
__author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"]
|
||||||
__git__ = "https://www.coastalcommits.com/cswimr/SeaCogs"
|
__git__ = "https://www.coastalcommits.com/cswimr/SeaCogs"
|
||||||
__version__ = "1.1.2"
|
__version__ = "1.1.3"
|
||||||
__documentation__ = "https://seacogs.coastalcommits.com/pterodactyl/"
|
__documentation__ = "https://seacogs.coastalcommits.com/pterodactyl/"
|
||||||
|
|
||||||
def __init__(self, bot: Red):
|
def __init__(self, bot: Red):
|
||||||
|
@ -97,14 +97,14 @@ class Bible(commands.Cog):
|
||||||
if response.status == 503:
|
if response.status == 503:
|
||||||
raise bible.errors.ServiceUnavailableError()
|
raise bible.errors.ServiceUnavailableError()
|
||||||
return Version(
|
return Version(
|
||||||
bible_id,
|
bible_id=bible_id,
|
||||||
data["data"]["abbreviation"],
|
abbreviation=data["data"]["abbreviation"],
|
||||||
data["data"]["language"]["name"],
|
language=data["data"]["language"]["name"],
|
||||||
data["data"]["abbreviationLocal"],
|
abbreviation_local=data["data"]["abbreviationLocal"],
|
||||||
data["data"]["language"]["nameLocal"],
|
language_local=data["data"]["language"]["nameLocal"],
|
||||||
data["data"]["description"],
|
description=data["data"]["description"],
|
||||||
data["data"]["descriptionLocal"],
|
description_local=data["data"]["descriptionLocal"],
|
||||||
data["data"]["copyright"],
|
version_copyright=data["data"]["copyright"],
|
||||||
)
|
)
|
||||||
|
|
||||||
async def _get_passage(
|
async def _get_passage(
|
||||||
|
@ -270,7 +270,7 @@ class Bible(commands.Cog):
|
||||||
description=passage["content"].replace("¶ ", ""),
|
description=passage["content"].replace("¶ ", ""),
|
||||||
color=await ctx.embed_color(),
|
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)
|
await ctx.send(embed=embed, file=icon)
|
||||||
else:
|
else:
|
||||||
await ctx.send(f"## {passage['reference']}\n{passage['content']}")
|
await ctx.send(f"## {passage['reference']}\n{passage['content']}")
|
||||||
|
@ -309,7 +309,7 @@ class Bible(commands.Cog):
|
||||||
description=passage["content"].replace("¶ ", ""),
|
description=passage["content"].replace("¶ ", ""),
|
||||||
color=await ctx.embed_color(),
|
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)
|
await ctx.send(embed=embed, file=icon)
|
||||||
else:
|
else:
|
||||||
await ctx.send(f"## {passage['reference']}\n{passage['content']}")
|
await ctx.send(f"## {passage['reference']}\n{passage['content']}")
|
||||||
|
|
|
@ -4,23 +4,23 @@ class Version:
|
||||||
bible_id,
|
bible_id,
|
||||||
abbreviation,
|
abbreviation,
|
||||||
language,
|
language,
|
||||||
abbreviationLocal,
|
abbreviation_local,
|
||||||
languageLocal,
|
language_local,
|
||||||
description,
|
description,
|
||||||
descriptionLocal,
|
description_local,
|
||||||
version_copyright,
|
version_copyright,
|
||||||
):
|
):
|
||||||
self.bible_id = bible_id
|
self.bible_id = bible_id
|
||||||
self.abbreviation = abbreviation
|
self.abbreviation = abbreviation
|
||||||
self.language = language
|
self.language = language
|
||||||
self.abbreviationLocal = abbreviationLocal
|
self.abbreviation_local = abbreviation_local
|
||||||
self.languageLocal = languageLocal
|
self.language_local = language_local
|
||||||
self.description = description
|
self.description = description
|
||||||
self.descriptionLocal = descriptionLocal
|
self.description_local = description_local
|
||||||
self.copyright = version_copyright
|
self.copyright = version_copyright
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.abbreviationLocal
|
return self.abbreviation_local
|
||||||
|
|
||||||
def __repr__(self):
|
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
Add a link
Reference in a new issue