Added !help

This commit is contained in:
2014-08-12 20:04:44 +01:00
parent 0f4234dfc3
commit 5f37552733

View File

@@ -26,6 +26,7 @@ class DropBot(ClientXMPP):
self.nickname = kwargs.pop('nickname', 'Dropbot')
self.cmd_prefix = kwargs.pop('cmd_prefix', '!')
self.kos_url = kwargs.pop('kos_url', 'http://kos.cva-eve.org/api/')
self.hidden_commands = []
self.redis_conn = Redis()
self.map = Map.from_json(pkgutil.get_data('dropbot', 'data/map.json'))
@@ -153,6 +154,11 @@ class DropBot(ClientXMPP):
# Commands
def cmd_help(self, args, msg):
return "Commands: {}".format(
', '.join([self.cmd_prefix + x[4:] for x in dir(self) if x[:4] == 'cmd_' and x not in self.hidden_commands]),
)
def cmd_price(self, args, msg):
item = ' '.join(args)
if item.strip() == '':