aboutsummaryrefslogtreecommitdiff
path: root/src/core_modules/command_spec
diff options
context:
space:
mode:
authorGravatar jesopo2020-02-28 13:56:56 +0000
committerGravatar jesopo2020-02-28 13:56:56 +0000
commit7dea6f04a97aea8182967c4a4f757f732b21f414 (patch)
tree8202c817316527a8f85cfa1eb937d1fb2f3f47a2 /src/core_modules/command_spec
parentv1.19.0-rc3 (diff)
signature
include !command in usage output
Diffstat (limited to 'src/core_modules/command_spec')
-rw-r--r--src/core_modules/command_spec/__init__.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core_modules/command_spec/__init__.py b/src/core_modules/command_spec/__init__.py
index 1fdd02a9..34fd5aef 100644
--- a/src/core_modules/command_spec/__init__.py
+++ b/src/core_modules/command_spec/__init__.py
@@ -139,10 +139,11 @@ class Module(ModuleManager.BaseModule):
context = utils.parse.SpecArgumentContext.CHANNEL
else:
context = utils.parse.SpecArgumentContext.PRIVATE
- usages = " | ".join(
- [utils.parse.argument_spec_human(s, context) for s in specs])
-
+ usages = [
+ utils.parse.argument_spec_human(s, context) for s in specs]
command = "%s%s" % (event["command_prefix"], event["command"])
- error_out = "%s (Usage: %s)" % (overall_error, usages)
+ usages = ["%s%s" % (command, u) for u in usages]
+
+ error_out = "%s (Usage: %s)" % (overall_error, " | ".join(usages))
return utils.consts.PERMISSION_HARD_FAIL, error_out