add help command

pull/1/head
Mallory Hancock 2017-10-09 13:45:32 -07:00
parent 6904595052
commit 689d35aec9
1 changed files with 4 additions and 0 deletions

View File

@ -55,6 +55,10 @@ class Bot(irc.bot.SingleServerIRCBot):
elif cmd == '!quit' and nick in self.ops:
c.quit("See y'all later!")
quit()
elif cmd == '!help':
helplist = sorted([i for i in self.cmds])
msg = ', '.join(helplist)
c.privmsg(chan, 'Available commands: {}'.format(msg))
elif cmd in self.cmds:
output = self.cmds[cmd](cmd=cmd, nick=nick, arg=arg)