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

Get Ayah from URL and /tafsir set and /atafsir set commands #61

Closed itzmk21 closed 1 year ago

itzmk21 commented 1 year ago

Added the context menu command that gets the Qur'an ayah from a URL This was tested with the following links, all of which work as intended:

[
            'https://quran.com/'
            'https://quran.com/',

            'https://quran.com/12:5',
            'https://quran.com/10:19/',
            'https://quran.com/7:12?param=value',
            'https://quran.com/154:3?param=value/',
            'https://quran.com/22:1-5/?param=value',
            'https://quran.com/11:45-542/?param=value/',

            'https://quran.com/12/5',
            'https://quran.com/10/19/',
            'https://quran.com/7/12?param=value',
            'https://quran.com/154/3?param=value/',
            'https://quran.com/22/1-5/?param=value',
            'https://quran.com/11/45-542/?param=value',
        ]

Closes #40

Rewrote the DBHandler child classes for less repetition Made tafsir commands into a group:

This requires you to create new tables: For Tafsir columns:

Closes #55

Use the app_commands.Range annotation to have built in range check, that checks if the page is between 1 and 604 for /mushaf by_page as well as for the day month and year args for /calendar commands

Update the help command embed to make mention slash commands - closes #62