Help: don't append space character before ':' when the usage key is None
This commit is contained in:
parent
c6e1e9acb2
commit
f496c31d1c
@ -102,7 +102,7 @@ class Bot(threading.Thread):
|
|||||||
for (s, h) in self.modules[module].__nemubot_context__.hooks:
|
for (s, h) in self.modules[module].__nemubot_context__.hooks:
|
||||||
if s == "in_Command" and (h.name is not None or h.regexp is not None) and h.is_matching(msg.args[0][1:]):
|
if s == "in_Command" and (h.name is not None or h.regexp is not None) and h.is_matching(msg.args[0][1:]):
|
||||||
if h.help_usage:
|
if h.help_usage:
|
||||||
return res.append_message(["\x03\x02%s%s\x03\x02: %s" % (msg.args[0], " " + (k if k is not None else ""), h.help_usage[k]) for k in h.help_usage], title="Usage for command %s from module %s" % (msg.args[0], module))
|
return res.append_message(["\x03\x02%s%s\x03\x02: %s" % (msg.args[0], (" " + k if k is not None else ""), h.help_usage[k]) for k in h.help_usage], title="Usage for command %s from module %s" % (msg.args[0], module))
|
||||||
elif h.help:
|
elif h.help:
|
||||||
return res.append_message("Command %s from module %s: %s" % (msg.args[0], module, h.help))
|
return res.append_message("Command %s from module %s: %s" % (msg.args[0], module, h.help))
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user