Commits

Stephen McDonald committed 9537de0 Draft

Fix CommandBot

Comments (0)

Files changed (1)

gnotty/bots/commands.py

         return " and ".join(", ".join(parts).rsplit(", ", 1))
 
     def commands_dict(self):
-        return dict([(c.event["args"][0], c) for c in self.events["command"]])
+        commands = self.events["command"]
+        return dict([(c.event.args["command"], c) for c in commands])
 
     ##############
     #  Commands  #
         which when given, will show help for that command.
         """
         if command_name is None:
-            return ("Type %scommands for a list of all commands. Type "
-                    "%shelp [command] to see help for a specific command." %
-                    (self.prefix_call, self.prefix_call))
+            return ("Type !commands for a list of all commands. Type "
+                    "!help [command] to see help for a specific command.")
         try:
             command = self.commands_dict()[command_name]
         except KeyError: