]> git.cworth.org Git - turbot/blobdiff - turbot/commands.py
Don't shove the local variable hunts_table into the turb object
[turbot] / turbot / commands.py
index 2a1f3e5b3ea618574b94cb53db8cace08b46f3e9..68f470a226b3f5cc7f9ba3ed82c0197f613f3595 100644 (file)
@@ -1,7 +1,7 @@
 import requests
 import turbot.rot
 
-def rot(slack_client, body, args):
+def rot(turb, body, args):
     """Implementation of the /rot command
 
     The args string should be as follows:
@@ -29,9 +29,13 @@ def rot(slack_client, body, args):
                       json = {"text": result},
                       headers = {"Content-type": "application/json"})
     else:
-        slack_client.chat_postMessage(channel=channel_id, text=result)
+        turb.slack_client.chat_postMessage(channel=channel_id, text=result)
 
     return {
         'statusCode': 200,
         'body': ""
     }
+
+commands = {
+    "/rot": rot
+}