galacticwarrior9 / IslamBot

A Discord bot that supports Qur'an, hadith, prayer times, tafsir and more.
GNU General Public License v3.0
87 stars 36 forks source link

Bug fixes + cleanup imports and requirements #60

Closed itzmk21 closed 1 year ago

itzmk21 commented 1 year ago

Fixed biography navigator not timing out as expected - was a typo I assume beforehand# Possibly fix #58 - that is, if the table column datatype isn't already INT

Some imports weren't used in some files since removed. The diff of requirements.txt:

-dblpy==0.4.0
-numpy==1.23.2
-pandas==1.4.3

The bot now uses topggpy and dblpy is an old dependency. numpy and pandas also aren't needed since the bot doesn't import them anywhere anymore - I think the bot used these dependencies in older versions, and were probably still sitting in system before doing a pip freeze.

Using transformers for surah args cleans up the lines of where it used to call the method.

Removing autocomplete for tafsir_name means autocomplete with the permanent choices are faster and overall better. There's about 15, so well under the limited 25. This is similar to how /hadith with hadith_collection already does it. However, since this was a recent commit by you, I would be more than happy to revert this commit, in favour of autocomplete, up to you really.

Added autocomplete for the translation paramater in /settranslation.