From 1625422a5f4916fceb4caf3e9a9030d6ec10b6ba Mon Sep 17 00:00:00 2001 From: phxntxm Date: Tue, 16 Oct 2018 18:44:19 -0500 Subject: [PATCH] Move back to pagination help command --- cogs/misc.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/cogs/misc.py b/cogs/misc.py index 3832a32..4825206 100644 --- a/cogs/misc.py +++ b/cogs/misc.py @@ -48,7 +48,28 @@ class Miscallaneous: @commands.command() @commands.cooldown(1, 3, commands.cooldowns.BucketType.user) @utils.can_run(send_messages=True) - async def help(self, ctx, *, entity: str = None): + async def help(self, ctx, *, command: str = None): + """Shows help about a command or the bot""" + + try: + if command is None: + p = await utils.HelpPaginator.from_bot(ctx) + else: + entity = self.bot.get_cog(command) or self.bot.get_command(command) + + if entity is None: + clean = command.replace('@', '@\u200b') + return await ctx.send(f'Command or category "{clean}" not found.') + elif isinstance(entity, commands.Command): + p = await utils.HelpPaginator.from_command(ctx, entity) + else: + p = await utils.HelpPaginator.from_cog(ctx, entity) + + await p.paginate() + except Exception as e: + await ctx.send(e) + + async def _help(self, ctx, *, entity: str = None): chunks = [] if entity: