From 94c31f263f6329c4e4b31ee91b6631162bc311c2 Mon Sep 17 00:00:00 2001 From: moneromooo Date: Sat, 25 Apr 2015 10:31:12 +0100 Subject: [PATCH] User error when asking for commands for a module that does not exist --- tipbot/command_manager.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tipbot/command_manager.py b/tipbot/command_manager.py index 673f830..0bf555b 100644 --- a/tipbot/command_manager.py +++ b/tipbot/command_manager.py @@ -67,6 +67,9 @@ def Commands(link,cmd): module_name = GetParam(cmd,1) if module_name: + if not module_name in modules: + link.send_private("%s is not a module, see module list with !commands" % module_name) + return link.send_private("Commands for %s's %s module:" % (config.tipbot_name,module_name)) else: link.send_private("Commands for %s (use !commands for help about the module's commands):" % config.tipbot_name)