From df33340aba9def926d60ba05625235ebbc7aad7a Mon Sep 17 00:00:00 2001 From: samari-k <safi.kuehn@gmx.de> Date: Thu, 23 Sep 2021 22:26:28 +0200 Subject: [PATCH] merge Master help.py --- cogs/help.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cogs/help.py b/cogs/help.py index 93b71cb..ae37ee4 100644 --- a/cogs/help.py +++ b/cogs/help.py @@ -70,9 +70,11 @@ async def handle_error(ctx, error): # syntax = data[ctx.command.name]['syntax'] # example = data[ctx.command.name]['example'] + cmd_name = f"{ctx.command.parent} {ctx.command.name}" if ctx.command.parent else f"{ctx.command.name}" + msg = ( - f"Fehler! Du hast ein Argument vergessen. Für weitere Hilfe gib `!help {ctx.command.name}` ein. \n" - f"`Syntax: {data['command'][ctx.command.name]['syntax']}`\n" + f"Fehler! Du hast ein Argument vergessen. Für weitere Hilfe gib `!help {cmd_name}` ein. \n" + f"`Syntax: {data['command'][cmd_name]['syntax']}`\n" ) await ctx.channel.send(msg) else: @@ -192,6 +194,10 @@ class Help(commands.Cog): color=19607) await utils.send_dm(ctx.author, text) # , embed=embed) + for subname in data['command']: + if subname.startswith(f"{name} "): + await self.help_card(ctx, subname) + @commands.command(name="debug-help") @commands.check(utils.is_mod) async def help_all(self, ctx, mod=False): -- GitLab