Ejemplo n.º 1
0
    async def page(self, ctx, page: int, *, reciter: str = 'mishary al-afasy'):

        if ctx.voice_client.is_playing():
            return await ctx.send(ALREADY_PLAYING.format(get_prefix(ctx)))

        try:
            page = int(page)
        except:
            return await ctx.send(
                "Invalid arguments. Commands: `{}page [page]:[ayah] [reciter]`."
                "\n\nExample: `{}ayah 604 abdul rahman al-sudais`.".format(
                    get_prefix(ctx)))

        reciter = reciter.lower()
        readable_reciter = reciter.replace('-',
                                           ' - ').title().replace(' - ', '-')

        if reciter not in everyayah_reciters:
            return await ctx.send(RECITER_NOT_FOUND.format(get_prefix(ctx)))

        if not 0 < page <= 604:
            return await ctx.send(PAGE_NOT_FOUND)

        url, url_page = self.make_page_url(page, reciter)

        await self.create_player(ctx, url)

        description = f'Playing **Page {page}.**\nReciter: **{readable_reciter}**.'

        em = self.make_embed(
            "\U000025B6 Qurʼān", description,
            f'Requested by {ctx.message.author}', 0x006400,
            f'https://www.searchtruth.org/quran/images2/large/page-{url_page}.jpeg'
        )
        await ctx.send(embed=em)
Ejemplo n.º 2
0
    async def ayah(self, ctx, ref: str, *, reciter: str = 'mishary al-afasy'):

        # if ctx.voice_client.is_playing():
        #     return await ctx.send(ALREADY_PLAYING.format(get_prefix(ctx)))

        try:
            surah, ayah = ref.split(':')
            surah = int(surah)
            ayah = int(ayah)

        except:
            return await ctx.send(
                "Invalid arguments. Commands: `{}play ayah [surah]:[ayah] [reciter]`."
                "\n\nExample: `{}play ayah 2:255 abdul rahman al-sudais`.".
                format(get_prefix(ctx)))

        reciter = reciter.lower()

        if reciter is None:
            return await ctx.send(RECITER_NOT_FOUND.format(get_prefix(ctx)))

        if not 0 < surah <= 114:
            return await ctx.send(SURAH_NOT_FOUND.format(get_prefix(ctx)))

        verse_count = await self.get_verse_count(surah)
        if ayah > verse_count:
            return await ctx.send(NON_EXISTENT_VERSE.format(verse_count))

        url = self.make_ayah_url(surah, ayah, reciter)
        try:
            player = await YTDLSource.from_url(url,
                                               loop=self.bot.loop,
                                               stream=True)
        except:
            return await ctx.send(RECITATION_NOT_FOUND)

        await self.create_player(ctx, url)

        reciter = reciter.replace('-', ' - ').title().replace(' - ', '-')
        transliterated_surah, arabic_surah = await self.get_surah_info(surah)
        description = f'Playing **Surah {transliterated_surah}** ({arabic_surah}), Ayah {ayah}. ' \
                      f'\nReciter: **{reciter}**.'

        em = self.make_embed(
            "\U000025B6 Qurʼān", description,
            f'Requested by {ctx.message.author}', 0x006400,
            f'https://everyayah.com/data/QuranText_jpg/{surah}_{ayah}.jpg')
        await ctx.send(embed=em)
Ejemplo n.º 3
0
    async def live(self, ctx, *, link: str = 'makkah'):

        if ctx.voice_client.is_playing():
            return await ctx.send(ALREADY_PLAYING.format(get_prefix(ctx)))

        link = link.lower()

        if link == 'quran radio' or link == 'quran' or link == '1':
            player = await YTDLSource.from_url(self.quranradio_url,
                                               loop=self.bot.loop,
                                               stream=True)
            ctx.voice_client.play(player)
            await ctx.send(
                "Now playing **mp3quran.net radio** (الإذاعة العامة - اذاعة متنوعة لمختلف القراء)."
            )

        elif link == 'makkah' or link == '2':
            player = await YTDLSource.from_url(self.makkah_url,
                                               loop=self.bot.loop,
                                               stream=True)
            ctx.voice_client.play(player)
            await ctx.send(
                "Now playing **Makkah Live** (قناة القرآن الكريم- بث مباشر).")

        elif link == 'alharamayn' or link == '3':
            player = await YTDLSource.from_url(self.radio3_url,
                                               loop=self.bot.loop,
                                               stream=True)
            ctx.voice_client.play(player)
            await ctx.send(
                "Now playing **Alharamayn Voice net Live** (إذاعة صوت الحرمين للقرآن الكريم - بث مباشر)."
            )
Ejemplo n.º 4
0
    async def mushaf(self, ctx, ref: str, tajweed: str = 'none'):

        try:
            surah, ayah = ref.split(':')
        except ValueError:
            return await ctx.send(invalid_format.format(get_prefix(ctx)))

        async with self.session.get(
                f'https://api.alquran.cloud/ayah/{surah}:{ayah}') as resp:
            if resp.status != 200:
                return await ctx.send(invalid_verse)
            data = await resp.json()
            page = data['data']['page']

        formatted_page = str(page).zfill(3)

        if tajweed == 'none':
            url = f'https://www.searchtruth.org/quran/images2/large/page-{formatted_page}.jpeg'
        else:
            url = f'https://www.searchtruth.org/quran/images1/{formatted_page}.jpg'

        arabic_page_number = convert_to_arabic_number(str(page))
        em = discord.Embed(title=f'Page {page}'
                           f'\n  الصفحة{arabic_page_number}',
                           colour=0x006400)
        em.set_author(name=f'Mushaf / مصحف', icon_url=icon)
        em.set_image(url=url)
        await ctx.send(embed=em)
Ejemplo n.º 5
0
    async def reciters(self, ctx):
        prefix = get_prefix(ctx)

        everyayah_reciter_list = ''
        for key in everyayah_reciters.keys():
            everyayah_reciter_list = everyayah_reciter_list + f'{key}, '
        mp3quran_reciters = len(await get_mp3quran_reciters())
        em = discord.Embed(
            description=
            f'\n\n**`{prefix}play surah` Reciters**\n\nAvailable reciters: '
            f'**{mp3quran_reciters}\n\n'
            f'[Click here for the full surah reciter list]'
            f'(https://github.com/nullbyto/MuslimBot/blob/master/Reciters.md)**\n\n'
            f'To search this list, type `{prefix}search [reciter name]`, e.g. '
            f'`{prefix}search dossary`\n'
            f'\n\n**`{prefix}play ayah` and `{prefix}play page` Reciters**'
            f'\n\nAvailable reciters: **{len(everyayah_reciters.keys())}**\n\n'
            f'List: ```{everyayah_reciter_list}```',
            colour=0x006400,
            title="Reciters")
        em.set_footer(
            text=
            "Use the ayah/page reciter list when playing individual ayahs and pages. Use the surah recit"
            "er list when playing surahs.")
        await ctx.send(embed=em)
Ejemplo n.º 6
0
    async def random(self, ctx, type: str = None):
        if type is None:
            await ctx.send(
                'Invalid Arguments, please choose a type. `{}random verse`'.
                format(get_prefix(ctx)))

        elif type == 'verse':
            random_num = random.randint(1, 6236)
            async with self.session.get(
                    f'http://api.alquran.cloud/ayah/{random_num}/editions/quran-uthmani,en.pickthall'
            ) as r:
                data = await r.json()
                text_ar = data['data'][0]['text']
                text_eng = data['data'][1]['text']
                name_ar = data['data'][0]['surah']['name']
                name_eng = data['data'][1]['surah']['englishName']
                name_eng_tr = data['data'][1]['surah'][
                    'englishNameTranslation']
                edition_ar = data['data'][0]['edition']['name']
                edition_eng = data['data'][1]['edition']['name']
            embed = discord.Embed(
                title='Random Verse from Quran',
                author_icon=ICON,
                description=f'{name_ar}\n{name_eng} ({name_eng_tr})\n\n'
                f'{text_ar}\n{text_eng}')
            embed.set_footer(
                text=f"Arabic: {edition_ar} | English: {edition_eng}")
            await ctx.send(embed=embed)
Ejemplo n.º 7
0
    async def morphology(self, ctx, ref: str):

        if not self.isInCorrectFormat(ref):
            await ctx.send(INVALID_ARGUMENTS.format(get_prefix(ctx)))
            return

        try:
            surah, verse, word = ref.split(':')

        except:
            await ctx.send(INVALID_ARGUMENTS.format(get_prefix(ctx)))
            return

        wordSource = await get_site_source(
            self.morphologyURL.format(surah, verse, word))
        wordImage = self.getWordImage(wordSource)

        paragraph = wordSource.find("p", "first")
        rawMorphology = str(wordSource.find("td", "morphologyCell").text)
        morphology = re.sub(r'((?<=[a-z])[A-Z]|(?<!\A)[A-Z](?=[a-z]))',
                            r' \n\1', rawMorphology)
        grammar = wordSource.find("td", "grammarCell")

        syntax = False
        if self.isSyntaxAvailable(int(surah)):
            syntax = True
            syntaxSource = await get_site_source(
                self.syntaxURL.format(surah, verse, word))
            syntaxImage = self.getSyntaxImage(syntaxSource, word)

        em = discord.Embed(colour=0x006400)
        em.set_author(name=f"Qurʾān {surah}:{verse}, Word {word}",
                      icon_url=icon)
        em.add_field(
            name='Morphology',
            value=f'From right to left: \n {morphology} ({grammar.text})',
            inline=False)
        em.add_field(name='Information',
                     value=f'{paragraph.text}',
                     inline=False)

        if syntax is True:
            em.set_image(url=syntaxImage)
            em.set_thumbnail(url=wordImage)
        else:
            em.set_image(url=wordImage)
        await ctx.send(embed=em)
Ejemplo n.º 8
0
    async def surah(self, ctx, surah, *, reciter: str = 'Mishary Alafasi'):

        # if ctx.voice_client.is_playing():
        #     return await ctx.send(ALREADY_PLAYING.format(get_prefix(ctx)))

        try:
            surah = int(surah)

        except ValueError:
            try:
                surah = await get_surah_id_from_name(surah.lower())
            # We try to suggest a correction if an invalid surah name string is given.
            except KeyError:
                surah_names = await get_surah_names()
                result = process.extract(surah,
                                         surah_names.keys(),
                                         scorer=fuzz.partial_ratio,
                                         limit=1)
                if result is not None:
                    await ctx.send(
                        f'Could not find {surah}, so the closest match - *{result[0][0]}* - will be used.'
                    )
                    surah = await get_surah_id_from_name(result[0][0].lower())
                else:
                    return await ctx.send(
                        SURAH_NOT_FOUND.format(get_prefix(ctx)))

        reciter = await get_mp3quran_reciter(reciter.lower())

        if reciter is None:
            return await ctx.send(RECITER_NOT_FOUND.format(get_prefix(ctx)))

        if not 0 < surah <= 114:
            return await ctx.send(SURAH_NOT_FOUND.format(get_prefix(ctx)))

        file_url = self.get_play_file(reciter.server, surah)

        await self.create_player(ctx, file_url)

        transliterated_surah, arabic_surah = await self.get_surah_info(surah)
        description = f'Playing **Surah {transliterated_surah}** ({arabic_surah}).\nReciter: **{reciter.name}**.' \
                      f'\nRiwayah: {reciter.riwayah}'

        em = self.make_embed("\U000025B6 Qurʼān", description,
                             f'Requested by {ctx.message.author}', 0x006400)
        await ctx.send(embed=em)
Ejemplo n.º 9
0
    async def quran(self, ctx, ref: str, edition: str = 'haleem'):
        async with ctx.channel.typing():

            # If no translation was specified, find a translation to use.
            if edition is None:
                try:

                    # edition = await get_guild_translation(ctx.message.guild.id)
                    edition = self.format_edition(edition)
                except AttributeError:
                    edition = 85

            # If a translation was specified in the command, check whether it is valid:
            else:
                try:
                    edition = self.format_edition(edition)
                except KeyError:
                    return await ctx.send(INVALID_TRANSLATION)

            # Now fetch the verses:
            try:
                spec = self.get_spec(ref, edition)
            except:
                return await ctx.send(
                    INVALID_ARGUMENTS_ENGLISH.format(get_prefix(ctx)))

            surah_name, readable_edition, revelation_type = await self.get_metadata(
                spec, edition)
            translated_surah_name = await self.get_translated_surah_name(
                spec, edition)

            if revelation_type == "makkah":
                revelation_type = "Meccan"
            else:
                revelation_type = "Medinan"

            await self.get_verses(spec)

            em = make_embed(
                fields=spec.ordered_dict,
                author=f"Surah {surah_name} ({translated_surah_name})",
                author_icon=ICON,
                colour=0x048c28,
                inline=False,
                footer=f'Translation: {readable_edition} |'
                f' {revelation_type}')

            if len(em) > 6000:
                return await ctx.send("This passage was too long to send.")

            await ctx.send(embed=em)
Ejemplo n.º 10
0
    async def dualist(self, ctx):
        prefix = get_prefix(ctx)
        list = [
            f'**Type {prefix}dua [topic]**. Example: `{prefix}dua breaking fast`\n'
        ]

        for dua in self.duas:
            list.append('\n' + dua.title())

        em = discord.Embed(title=f'Dua List',
                           colour=0x467f05,
                           description=''.join(list))
        em.set_footer(text="Source: Fortress of the Muslim (Hisnul Muslim)")

        await ctx.send(embed=em)
Ejemplo n.º 11
0
    async def abstract_hadith(self, channel, collection_name, ref, lang, page):
        if collection_name in HADITH_COLLECTION_LIST:
            spec = HadithSpecifics(collection_name, self.session, lang, ref,
                                   page)
        else:
            return await channel.send(INVALID_INPUT.format(get_prefix(channel))
                                      )

        await spec.getHadith()

        if spec.hadith.hadithText:

            em = spec.makeEmbed()
            msg = await channel.send(embed=em)

            if spec.num_pages > 1:
                await msg.add_reaction(emoji='⬅')
                await msg.add_reaction(emoji='➡')

            while True:
                try:
                    reaction, user = await self.bot.wait_for(
                        "reaction_add",
                        timeout=120,
                        check=lambda reaction, user:
                        (reaction.emoji == '➡' or reaction.emoji == '⬅') and
                        user != self.bot.user and reaction.message.id == msg.id
                    )

                except asyncio.TimeoutError:
                    await msg.remove_reaction(emoji='➡', member=self.bot.user)
                    await msg.remove_reaction(emoji='⬅', member=self.bot.user)
                    break

                await msg.remove_reaction(reaction.emoji, user)

                if reaction.emoji == '➡' and spec.page < spec.num_pages:
                    spec.page += 1

                if reaction.emoji == '⬅' and spec.page > 1:
                    spec.page -= 1

                em = spec.makeEmbed()
                await msg.edit(embed=em)

        else:
            await channel.send(ERROR)
Ejemplo n.º 12
0
    async def aquran(self, ctx, *, ref: str):
        try:
            spec = self.get_spec(ref)
        except:
            return await ctx.send(
                INVALID_ARGUMENTS_ARABIC.format(get_prefix(ctx)))

        surah_name = await self.get_metadata(spec, edition='ar')
        await self.get_verses(spec)

        em = make_embed(fields=spec.ordered_dict,
                        author=f' سورة {surah_name}',
                        author_icon=ICON,
                        colour=0x048c28,
                        inline=False,
                        footer="")

        if len(em) > 6000:
            return await ctx.send("This passage was too long to send.")

        await ctx.send(embed=em)
Ejemplo n.º 13
0
    async def prayertimes(self, ctx, *, location):

        try:
            # Open URL and parse JSON
            async with self.session.get(self.default_url.format(location, '0'), headers=headers) as resp:
                data = await resp.json()

            # Assign variables from JSON
            fajr = data['data']['timings']['Fajr']
            sunrise = data['data']['timings']['Sunrise']
            dhuhr = data['data']['timings']['Dhuhr']
            default_asr = data['data']['timings']['Asr']
            maghrib = data['data']['timings']['Maghrib']
            isha = data['data']['timings']['Isha']
            imsak = data['data']['timings']['Imsak']
            midnight = data['data']['timings']['Midnight']
            date = data['data']['date']['readable']

            async with self.session.get(self.hanafi_url.format(location, '1'), headers=headers) as resp:
                data = await resp.json()

            hanafi_asr = data['data']['timings']['Asr']

            # Construct and send embed
            em = discord.Embed(colour=0x2186d3, title=date)
            em.set_author(name=f'Prayer Times for {location.title()}', icon_url=icon)
            em.add_field(name=f'**Imsak (إِمْسَاك)**', value=f'{imsak}', inline=True)
            em.add_field(name=f'**Fajr (صلاة الفجر)**', value=f'{fajr}', inline=True)
            em.add_field(name=f'**Sunrise (طلوع الشمس)**', value=f'{sunrise}', inline=True)
            em.add_field(name=f'**Ẓuhr (صلاة الظهر)**', value=f'{dhuhr}', inline=True)
            em.add_field(name=f'**Asr (صلاة العصر)**', value=f'{default_asr}', inline=True)
            em.add_field(name=f'**Asr - Ḥanafī School (صلاة العصر - حنفي)**', value=f'{hanafi_asr}', inline=True)
            em.add_field(name=f'**Maghrib (صلاة المغرب)**', value=f'{maghrib}', inline=True)
            em.add_field(name=f'**Isha (صلاة العشاء)**', value=f'{isha}', inline=True)
            em.add_field(name=f'**Midnight (منتصف الليل)**', value=f'{midnight}', inline=True)
            em.set_footer(text=f'Calculation Method: Umm al-Qura University')
            await ctx.send(embed=em)

        except:
            await ctx.send(INVALID_ARGUMENTS.format(get_prefix(ctx)))
Ejemplo n.º 14
0
 async def error_handler(self, ctx, error):
     if isinstance(error, MissingRequiredArgument):
         await ctx.send(WRONG_COMMAND.format(get_prefix(ctx)))
Ejemplo n.º 15
0
 async def play(self, ctx):
     if ctx.invoked_subcommand is None:
         await ctx.send(
             '**Invalid arguments**. For help, type `{}help play`.'.format(
                 get_prefix(ctx)))
Ejemplo n.º 16
0
    async def help(self, ctx, *, section: str = "main"):
        prefix = get_prefix(ctx)
        section = section.lower()

        # Main help page menu
        if section == "main":
            em = discord.Embed(
                title='\U0001F91D Hello! Im MuslimBot!',
                colour=0x1f8b4c,
                description=
                f"Type `{prefix}help [category | number]` to post its commands here e.g.: `{prefix}help prayer times`"
            )
            em.add_field(
                name="***Categories***",
                value=
                '\n0. Audio\n1. Quran\n2. Hadith\n3. Tafsir\n4. Prayer Times\n5. Dua\n6. Calendar\n7. General',
                inline=False)
            em.add_field(
                name="***Links***",
                value=
                "• **[Vote](https://top.gg/bot/574979234578300948/vote)**\n"
                "• **[GitHub](https://github.com/nullbyto/muslimbot)**\n"
                "• **[Documentation](https://github.com/nullbyto/MuslimBot/blob/master/Documentation.md)**\n",
                inline=False)
            em.add_field(
                name="***Support***",
                value=
                "Join **https://discord.gg/ar9ksAy** and post in the support section"
            )
            em.set_footer(text="Have a nice day!")
            await ctx.send(embed=em)

    # Categories pages
        elif section == "quran" or section == "1":
            em = discord.Embed(
                title="Quran",
                colour=0x1f8b4c,
                description=f'Available translations: `{prefix}translationlist`'
            )
            em.add_field(
                name=f"{prefix}quran",
                inline=True,
                value="Gets Quranic verses."
                f"\n\n`{prefix}quran [surah]:[ayah] [optional translation]`"
                f"\nExample: `{prefix}quran 1:1`"
                f"\n\n`{prefix}quran [surah:[first_ayah]-[last_ayah] [optional_translation]`"
                f"\nExample: `{prefix}quran 1:1-7 turkish`")

            em.add_field(
                name=f"{prefix}aquran",
                inline=True,
                value="Gets Quranic verses in Arabic."
                f"\n\n`{prefix}aquran [surah]:[ayah]`"
                f"\nExample: `{prefix}aquran 1:1`"
                f"\n\n`{prefix}quran [surah]:[first_ayah]-[last_ayah]`"
                f"\nExample: `{prefix}aquran 1:1-7`")

            em.add_field(
                name=f"{prefix}morphology",
                inline=False,
                value="View the morphology of a Qur'anic word."
                f"\n\n`{prefix}morphology [surah]:[ayah]:[word number]`"
                f"\nExample: `{prefix}morphology 2:255:1`")

            em.add_field(
                name=f"{prefix}mushaf",
                inline=True,
                value="View a Quranic verse on a *mushaf*."
                f"\n\n`{prefix}mushaf [surah]:[ayah]`"
                f"\nExample: `{prefix}mushaf 1:1`"
                "\n\nAdd 'tajweed' to the end for a page with color-coded tajweed rules."
                f"\nExample: `{prefix}mushaf 1:1 tajweed`")

            em.add_field(name=f"{prefix}random",
                         inline=True,
                         value="View a random verse from Quran."
                         f"\n\n`{prefix}random verse`")

            await ctx.send(embed=em)

        elif section == "tafsir" or section == "3":
            em = discord.Embed(
                title="Tafsir",
                colour=0x1f8b4c,
                description=f'Available tafsirs: `{prefix}tafsirlist`')

            em.add_field(
                name=f"{prefix}tafsir",
                inline=True,
                value="Gets tafsir in English."
                f"\n\n`{prefix}tafsir [surah]:[ayah] [optional_tafsir_name]`"
                f"\n\nExample: `{prefix}tafsir 1:1`"
                f"\n\nExample 2: `{prefix}tafsir 1:1 jalalayn`")

            em.add_field(
                name=f"{prefix}atafsir",
                inline=True,
                value="Gets tafsir in Arabic."
                f"\n\n`{prefix}atafsir [surah]:[ayah] [optional_tafsir_name]`"
                f"\n\nExample: `{prefix}atafsir 1:1`"
                f"\n\nExample 2: `{prefix}atafsir 1:1 ibnkathir`")

            await ctx.send(embed=em)

        elif section == "calendar" or section == "6":
            em = discord.Embed(title="Hijri Calendar", colour=0x1f8b4c)

            em.add_field(name=f"{prefix}hijridate",
                         inline=True,
                         value="Gets the current Hijri date")

            em.add_field(name=f"{prefix}converttohijri",
                         inline=True,
                         value="Converts a Gregorian date to its Hijri."
                         f"\n\n`{prefix}converttohijri DD-MM-YYYY`"
                         f"\n\nExample: `{prefix}converttohijri 01-01-2020`")

            em.add_field(name=f"{prefix}convertfromhijri",
                         inline=True,
                         value="Converts a Hijri date to its Gregorian."
                         f"\n\n`{prefix}convertfromhijri DD-MM-YYYY`"
                         f"\n\nExample: `{prefix}convertfromhijri 12-03-1440`")
            await ctx.send(embed=em)

        elif section == "hadith" or section == "2":
            em = discord.Embed(
                title="Hadith",
                colour=0x1f8b4c,
                description="These commands fetch hadith from *sunnah.com*.")

            em.add_field(
                name=f"{prefix}hadith",
                inline=True,
                value="Gets a hadith in English."
                f"\n\n`{prefix}hadith [collection] [book_number]:[hadith_number]`"
                f"\n\nExample: `{prefix}hadith bukhari 2:6` for http://sunnah.com/bukhari/2/6"
            )

            em.add_field(
                name=f"{prefix}ahadith",
                inline=True,
                value="Gets a hadith in Arabic."
                f"\n\n`{prefix}ahadith [collection] [book_number]:[hadith_number]`"
                f"\n\nExample: `{prefix}ahadith bukhari 2:6` for http://sunnah.com/bukhari/2/6"
            )

            em.add_field(
                name=f"{prefix}uhadith",
                inline=True,
                value="Gets a hadith in Urdu."
                f"\n\n`{prefix}uhadith [collection] [book_number]:[hadith_number]`"
                f"\n\nExample: `{prefix}uhadith bukhari 1:1` for http://sunnah.com/bukhari/1/1"
            )

            await ctx.send(embed=em)

        elif section == "prayer times" or section == "4":
            em = discord.Embed(title="Prayer Times", colour=0x1f8b4c)

            em.add_field(name=f"{prefix}prayertimes",
                         inline=True,
                         value="Gets prayer times for a specific location."
                         f"\n\n`{prefix}prayertimes [location]`"
                         f"\n\nExample: `{prefix}prayertimes London, UK`")

            await ctx.send(embed=em)

        elif section == "dua" or section == "5":
            em = discord.Embed(
                title="Dua",
                colour=0x1f8b4c,
                description=f'Available duas: `{prefix}dualist`')
            em.add_field(name=f"{prefix}dua",
                         inline=True,
                         value="Gets a dua for a topic."
                         f"\n\n`{prefix}dua [topic]`"
                         f"\n\nExample: `{prefix}dua forgiveness`")
            await ctx.send(embed=em)

        elif section == "audio" or section == "0":
            em = discord.Embed(
                title="Quranic Audio",
                colour=0x1f8b4c,
                description=f'Available Reciters: `{prefix}reciters`')
            em.add_field(
                name=f"{prefix}play",
                inline=True,
                value="plays the recitation of a surah, ayah or mushaf page."
                f"\n**Playing a surah**\n`{prefix}play surah [surah number] [reciter]`"
                f"\n**Playing an ayah**\n`{prefix}play ayah [surah]:[ayah] [reciter]`"
                f"\n**Playing a page from the mushaf**\n`{prefix}play page [page number] [reciter]`"
                f"\n\nFor more info: `{prefix}help play`")
            em.add_field(
                name=f"{prefix}live",
                inline=False,
                value=
                "plays live audio either from Makkah or online Qur'an radio."
                f"`{prefix}live [makkah / quran radio / alharamayn]` or choose from 1/2/3."
            )
            em.add_field(name=f"{prefix}search",
                         inline=False,
                         value="search the reciter list for `play` command\n"
                         f"`{prefix}search [reciter name]`")
            em.add_field(name=f"{prefix}pause",
                         inline=False,
                         value="pauses the audio")
            em.add_field(name=f"{prefix}resume",
                         inline=False,
                         value="resume the audio")
            em.add_field(
                name=f"{prefix}stop",
                inline=False,
                value="stops audio and disconnects the bot from voice chat")
            em.add_field(name=f"{prefix}leave",
                         inline=False,
                         value="disconnects the bot from voice chat")
            # em.add_field(name=f"{prefix}volume", inline=False, value="changes the volume of the bot\n"
            #                                                            f"`{prefix}volume [volume]`. volume must be between 1 and 100")
            await ctx.send(embed=em)

        elif section == "general" or section == "7":
            em = discord.Embed(title="General",
                               colour=0x1f8b4c,
                               description=f'General purpose commands.')
            em.add_field(
                name=f"{prefix}prefix",
                inline=False,
                value="Changes server's prefix for the bot.(Server's owner only)"
                f"\n\n`{prefix}prefix` shows current prefix"
                f"\n`{prefix}prefix [prefix]`\nExample: `{prefix}prefix ++`")
            em.add_field(
                name=f"{prefix}userinfo",
                inline=False,
                value=
                "Shows all general info about the user, can be used with mention."
                f"\n\n`{prefix}userinfo`\n`{prefix}userinfo [@user]`")

            await ctx.send(embed=em)

    # Specific help pages
        elif section == "play":
            em = discord.Embed(colour=0x1f8b4c, title='`play` Command')
            em.add_field(
                value=
                f"**{prefix}play** plays a surah, ayah or page from the mushaf in a voice channel.",
                name='Description',
                inline=False)
            em.add_field(
                value=
                f"`{prefix}play surah [surah number] [reciter]`\n\nExample: `{prefix}play surah 1 Mishary Alafasi`"
                f"\n__**OR**__ \n`{prefix}play surah [surah name] [reciter]`\n\nExample: `{prefix}play surah al-fatiha"
                " Mishary Alafasi`",
                name='Playing a surah',
                inline=False)
            em.add_field(
                value=
                f"`{prefix}play ayah [surah]:[ayah] [reciter]`\n\nExample: `{prefix}play ayah 1:6 hani al-rifai`",
                name='Playing an ayah',
                inline=False)
            em.add_field(
                value=
                f"`{prefix}play page [page number] [reciter]`\n\nExample: `{prefix}play page 342 hani al-rifai`",
                name='Playing a page from the mushaf',
                inline=False)
            em.add_field(
                value=f"Type `{prefix}reciters` for a list of reciters.",
                name='Reciters',
                inline=False)
            await ctx.send(embed=em)

        else:
            await ctx.send(
                f'**Invalid category, please choose one of the categories like this example:** `{prefix}help prayer times`'
            )