Update _internal_utils.py (#3673)

This commit is contained in:
jack1142 2020-03-28 01:37:59 +01:00 committed by GitHub
parent 5d66e4eaf8
commit c1a96c83fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -152,7 +152,8 @@ async def format_fuzzy_results(
if embed is not False and (embed is True or await ctx.embed_requested()): if embed is not False and (embed is True or await ctx.embed_requested()):
lines = [] lines = []
for cmd in matched_commands: for cmd in matched_commands:
lines.append(f"**{ctx.clean_prefix}{cmd.qualified_name}** {cmd.short_doc}") short_doc = cmd.format_shortdoc_for_context(ctx)
lines.append(f"**{ctx.clean_prefix}{cmd.qualified_name}** {short_doc}")
return discord.Embed( return discord.Embed(
title="Perhaps you wanted one of these?", title="Perhaps you wanted one of these?",
colour=await ctx.embed_colour(), colour=await ctx.embed_colour(),
@ -161,7 +162,8 @@ async def format_fuzzy_results(
else: else:
lines = [] lines = []
for cmd in matched_commands: for cmd in matched_commands:
lines.append(f"{ctx.clean_prefix}{cmd.qualified_name} -- {cmd.short_doc}") short_doc = cmd.format_shortdoc_for_context(ctx)
lines.append(f"{ctx.clean_prefix}{cmd.qualified_name} -- {short_doc}")
return "Perhaps you wanted one of these? " + box("\n".join(lines), lang="vhdl") return "Perhaps you wanted one of these? " + box("\n".join(lines), lang="vhdl")