]> git.cworth.org Git - turbot/blob - turbot/actions.py
Introduce a new modal view when the user clicks the "New Hunt" button
[turbot] / turbot / actions.py
1 import turbot.views
2
3 def new_hunt(turb, payload):
4
5     print("In new_hunt function")
6     view = turbot.views.new_hunt()
7     turb.slack_client.views_open(trigger_id=payload['trigger_id'],
8                                  view=view)
9
10     return {
11         'statusCode': 200,
12         'body': 'OK'
13     }
14
15 actions = {
16     "button": {
17         "new_hunt": new_hunt
18     }
19 }