Skip to content
Snippets Groups Projects
Commit df33340a authored by samari-k's avatar samari-k
Browse files

merge Master help.py

parent 676052b3
No related branches found
No related tags found
1 merge request!74Links verwalten
...@@ -70,9 +70,11 @@ async def handle_error(ctx, error): ...@@ -70,9 +70,11 @@ async def handle_error(ctx, error):
# syntax = data[ctx.command.name]['syntax'] # syntax = data[ctx.command.name]['syntax']
# example = data[ctx.command.name]['example'] # 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 = ( msg = (
f"Fehler! Du hast ein Argument vergessen. Für weitere Hilfe gib `!help {ctx.command.name}` ein. \n" f"Fehler! Du hast ein Argument vergessen. Für weitere Hilfe gib `!help {cmd_name}` ein. \n"
f"`Syntax: {data['command'][ctx.command.name]['syntax']}`\n" f"`Syntax: {data['command'][cmd_name]['syntax']}`\n"
) )
await ctx.channel.send(msg) await ctx.channel.send(msg)
else: else:
...@@ -192,6 +194,10 @@ class Help(commands.Cog): ...@@ -192,6 +194,10 @@ class Help(commands.Cog):
color=19607) color=19607)
await utils.send_dm(ctx.author, text) # , embed=embed) 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.command(name="debug-help")
@commands.check(utils.is_mod) @commands.check(utils.is_mod)
async def help_all(self, ctx, mod=False): async def help_all(self, ctx, mod=False):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment