+
+def help_command(turb, body, args):
+ """Implementation of the /help command
+
+ Displays help on how to use Turbot.
+ """
+
+ channel_id = body['channel_id'][0]
+ response_url = body['response_url'][0]
+
+ help_string = turbot_help(args)
+
+ # The "/help me" command is special in that it reports in the
+ # current channel, (where all other commands report privately to
+ # the invoking user).
+ if args == "me":
+ turb.slack_client.chat_postMessage(
+ channel=channel_id, text=help_string)
+ else:
+ requests.post(response_url,
+ json = {"text": help_string},
+ headers = {"Content-type": "application/json"})
+
+ return lambda_ok
+
+commands["/help"] = help_command