fix(bible): song of solomon will now translate properly
This commit is contained in:
parent
feac213017
commit
4a4ffcd1ee
1 changed files with 6 additions and 1 deletions
|
@ -35,7 +35,12 @@ class Bible(commands.Cog):
|
||||||
|
|
||||||
async def translate_book_name(self, bible_id: str, book_name: str) -> str:
|
async def translate_book_name(self, bible_id: str, book_name: str) -> str:
|
||||||
"""Translate a book name to a book ID."""
|
"""Translate a book name to a book ID."""
|
||||||
book_name = book_name.title()
|
book_name_list = book_name.split()
|
||||||
|
for w in book_name_list:
|
||||||
|
book_name_list.remove(w)
|
||||||
|
if not w.lower() == "of":
|
||||||
|
w = w.capitalize()
|
||||||
|
book_name_list.append(w)
|
||||||
books = await self._get_books(bible_id)
|
books = await self._get_books(bible_id)
|
||||||
for book in books:
|
for book in books:
|
||||||
if book_name in (book["abbreviation"], book["name"]):
|
if book_name in (book["abbreviation"], book["name"]):
|
||||||
|
|
Loading…
Reference in a new issue