mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-28 05:29:25 +01:00
mention that command is an alias or has aliases available in help command
This commit is contained in:
parent
20abac7461
commit
f0379d79ef
9
utils.py
9
utils.py
@ -424,7 +424,14 @@ class ServiceBot():
|
|||||||
_reply_format(next_line)
|
_reply_format(next_line)
|
||||||
else:
|
else:
|
||||||
_reply("Error: Command %r doesn't offer any help." % command)
|
_reply("Error: Command %r doesn't offer any help." % command)
|
||||||
return
|
|
||||||
|
# Regardless of whether help text is available, mention aliases.
|
||||||
|
if not shortform:
|
||||||
|
if command in self.alias_cmds:
|
||||||
|
_reply('Alias for %s.' % self.alias_cmds[command])
|
||||||
|
aliases = set(alias for alias, primary in self.alias_cmds.items() if primary == command)
|
||||||
|
if aliases:
|
||||||
|
_reply('Available aliases: %s' % ', '.join(aliases))
|
||||||
|
|
||||||
def help(self, irc, source, args):
|
def help(self, irc, source, args):
|
||||||
"""<command>
|
"""<command>
|
||||||
|
Loading…
Reference in New Issue
Block a user