From 4a4ffcd1ee474df5428c869a47a18a9a5360494c Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 1 Feb 2024 19:21:10 -0500 Subject: [PATCH] fix(bible): song of solomon will now translate properly --- bible/bible.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bible/bible.py b/bible/bible.py index fe262ac..d518292 100644 --- a/bible/bible.py +++ b/bible/bible.py @@ -35,7 +35,12 @@ 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 = 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) for book in books: if book_name in (book["abbreviation"], book["name"]):