PyDrocsid / cogs

The official cog library used by PyDrocsid bots
GNU General Public License v3.0
13 stars 5 forks source link

Search in the Docs of Pycord #160

Closed leon-3 closed 2 years ago

leon-3 commented 3 years ago

Is your feature request related to a problem? Please describe. I think, more people will switch to a discord.py fork like pycord, therefore it would be usefull to have a .pycord_docs command to search in the pycord docs just like in the discord.py docs.

Describe the solution you'd like As described above a .pycord_docs command (aliases: pycord, pyc) just like the .dpy_docs command.

Additional context From "Lynix152#9707":

ich glaub das ist nicht viel, das ist nur in line 183 was dazunehmen:

async def do_rtfm(ctx: Context, key: str, obj: Optional[str]):
    page_types = {"discord.py": "https://discordpy.readthedocs.io/en/latest", "python": "https://docs.python.org/3 ", "pycord": "https://pycord.readthedocs.io/en/latest/index.html"}

(Die doc von PyCord und dpy ist ja fast gleich aufgebaut)

@commands.command(aliases=["pyc"])
    async def pyc(self, ctx: Context, *, obj: str = None):
        """
        search the official python documentation
        """

        await do_rtfm(ctx, "pycord", obj)

Maybe a rtfm command for other discord.py forks like nextcord could also be usefull.

Defelo commented 2 years ago

fixed in da787ce