3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 11:42:51 +01:00

ServiceBot: tweak display format for command aliases

Specifically: bold the command lists, add a space before, and be more specific with "alias for X".
This commit is contained in:
James Lu 2017-07-10 22:12:53 -07:00
parent bd19468825
commit 63ce7ea407

View File

@ -430,10 +430,12 @@ class ServiceBot():
# 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])
_reply(' ')
_reply('This command is an alias for \x02%s\x02.' % 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))
_reply(' ')
_reply('Available aliases: \x02%s\x02' % ', '.join(aliases))
def help(self, irc, source, args):
"""<command>