fix(bible): hopefully f ixed translate_book_name

This commit is contained in:
Seaswimmer 2024-02-01 20:11:22 -05:00
parent 88aad510b9
commit fb2e607af1
Signed by untrusted user: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -36,10 +36,9 @@ class Bible(commands.Cog):
async def translate_book_name(self, bible_id: str, book_name: str) -> str:
"""Translate a book name to a book ID."""
book_name_list = book_name.split()
for w in book_name_list:
book_name_list.remove(w)
book_name_list.append(w.lower() if w.lower() == "of" else w.title())
book_name_list = [
w.lower() if w.lower() == "of" else w.title() for w in book_name.split()
]
book_name = " ".join(book_name_list)
books = await self._get_books(bible_id)
for book in books: