@@ -107,8 +107,8 @@ async def save_or_display_reactions(
107107 client (AsyncWebClient): an initialzied slack web client to communicate with slack API
108108 command (dict): json payload with information about the command triggered by the user
109109 E.g.
110- {'token': 'MKxqqxT4PQMBnyNJdjAocKOF', 'team_id': 'T01S9QDF7AT ', 'team_domain': 'ccc-yzo4468 ', 'channel_id': 'D01T36EUQTT', 'channel_name': 'directmessage', 'user_id': 'U01SWNKJR6G', 'user_name': 'user.name', 'command': '/multireact', 'text': ':+1::raised_hands:: eyes::clap::large_blue_circle::100::heart: ', 'api_app_id': 'A01S9QL1VAT ', 'is_enterprise_install': 'false', 'response_url': 'https://hooks.slack...WRrsPnTqV8QtqZ5Un0', 'trigger_id': '1917238991...9a29a6da4'} # pylint: disable=line-too-long
111- {'api_app_id': 'A01TWV8NAEN ', 'channel_id': 'D01SQA99362', 'channel_name': 'directmessage', 'command': '/multireact', 'enterprise_id': 'EG26V10SE ', 'enterprise_name': 'ABK-SB ', 'is_enterprise_install': 'false', 'response_url': 'https://hooks.slack....UFIRvQgGs0', 'team_domain': 'kingcom-sandbox ', 'team_id': 'T8T3GKUKZ ', 'token': 'wF8MDfFS8BLd30KFYLT1MlZa', 'trigger_id': '1995489393941.299118...b1d2b8f830', 'user_id': 'U01SXA059B5', 'user_name': 'cris.c '}
110+ {'token': 'MKxqqxT4PQMBnyNJdjAocKOF', 'team_id': '<tid> ', 'team_domain': '<tname> ', 'channel_id': 'D01T36EUQTT', 'channel_name': 'directmessage', 'user_id': 'U01SWNKJR6G', 'user_name': 'user.name', 'command': '/multireact', 'text': ':+1::eyes::clap:', 'api_app_id': '<id> ', 'is_enterprise_install': 'false', 'response_url': 'https://hooks.slack...WRrsPnTqV8QtqZ5Un0', 'trigger_id': '1917238991...9a29a6da4'} # pylint: disable=line-too-long
111+ {'api_app_id': '<id> ', 'channel_id': 'D01SQA99362', 'channel_name': 'directmessage', 'command': '/multireact', 'enterprise_id': '<eid> ', 'enterprise_name': '<ename> ', 'is_enterprise_install': 'false', 'response_url': 'https://hooks.slack....UFIRvQgGs0', 'team_domain': '<tname> ', 'team_id': '<tid> ', 'token': 'wF8MDfFS8BLd30KFYLT1MlZa', 'trigger_id': '1995489393941.299118...b1d2b8f830', 'user_id': 'U01SXA059B5', 'user_name': '<uname> '}
112112 respond (AsyncRespond): function that sends an ephemeral response for slack commands
113113 logger (Logger): optional logger passed to all handlers
114114 """
@@ -173,8 +173,8 @@ async def add_reactions(
173173 ack (AsyncAck): function to inform slack that an event has been received
174174 shortcut (dict): json payload with information about the shortcut triggered by the user
175175 E.g.
176- {'type': 'message_action', 'token': 'MKxqqxT4PQMBnyNJdjAocKOF', 'action_ts': '1617307130.812650', 'team': {'id': 'T01S9QDF7AT ', 'domain': 'ccc-yzo4468 '}, 'user': {'id': 'U01SWNKJR6G', 'username': 'user.name', 'team_id': 'T01S9QDF7AT ', 'name': 'User Name'}, 'channel': {'id': 'C01S9QDFYNT', 'name': 'general'}, 'is_enterprise_install': False, 'enterprise': None, 'callback_id': 'add_reactions', 'trigger_id': '1921893944...3e6a446fbc18', 'response_url': 'https://hooks.slack...L9Vdrbee00sZG', 'message_ts': '1617307089.003400', 'message': {'client_msg_id': '6f9e6469-1...70b17af92b', 'type': 'message', 'text': 'asdfghjkl', 'user': 'U01SWNKJR6G', 'ts': '1617307089.003400', 'team': 'T01S9QDF7AT ', 'blocks': [{'type': 'rich_text', 'block_id': 'm3V', 'elements': [{'type': 'rich_text_section', 'elements': [{'type': 'text', 'text': 'asdfghjkl'}]}]}]}} # pylint: disable=line-too-long
177- {'action_ts': '1619339417.302061', 'callback_id': 'add_reactions', 'channel': {'id': 'C01V7KXNRRS', 'name': 'slapp-1119 '}, 'enterprise': {'id': 'EG26V10SE ', 'name': 'ABK-SB '}, 'is_enterprise_install': False, 'message': {'blocks': [...], 'client_msg_id': '437b2675-6524-4724-a...69a4e0b9f6', 'team': 'T8T3GKUKZ ', 'text': '210', 'ts': '1619339414.000200', 'type': 'message', 'user': 'U01SXA059B5'}, 'message_ts': '1619339414.000200', 'response_url': 'https://hooks.slack....tkt5yMCogg', 'team': {'domain': 'kingcom-sandbox ', 'enterprise_id': 'EG26V10SE ', 'enterprise_name': 'ABK-SB ', 'id': 'T8T3GKUKZ '}, 'token': 'wF8MDfFS8BLd30KFYLT1MlZa', 'trigger_id': '1991796659910.299118...7619ad8bd4', 'type': 'message_action', 'user': {'id': 'U01SXA059B5', 'name': 'cris.c ', 'team_id': 'T8T3GKUKZ ', 'username': 'cris.c '}}
176+ {'type': 'message_action', 'token': 'MKxqqxT4PQMBnyNJdjAocKOF', 'action_ts': '1617307130.812650', 'team': {'id': '<tid> ', 'domain': '<domain> '}, 'user': {'id': 'U01SWNKJR6G', 'username': 'user.name', 'team_id': '<tid> ', 'name': 'User Name'}, 'channel': {'id': 'C01S9QDFYNT', 'name': 'general'}, 'is_enterprise_install': False, 'enterprise': None, 'callback_id': 'add_reactions', 'trigger_id': '1921893944...3e6a446fbc18', 'response_url': 'https://hooks.slack...L9Vdrbee00sZG', 'message_ts': '1617307089.003400', 'message': {'client_msg_id': '6f9e6469-1...70b17af92b', 'type': 'message', 'text': 'asdfghjkl', 'user': 'U01SWNKJR6G', 'ts': '1617307089.003400', 'team': '<tid> ', 'blocks': [{'type': 'rich_text', 'block_id': 'm3V', 'elements': [{'type': 'rich_text_section', 'elements': [{'type': 'text', 'text': 'asdfghjkl'}]}]}]}} # pylint: disable=line-too-long
177+ {'action_ts': '1619339417.302061', 'callback_id': 'add_reactions', 'channel': {'id': 'C01V7KXNRRS', 'name': '<chname> '}, 'enterprise': {'id': '<eid> ', 'name': '<ename> '}, 'is_enterprise_install': False, 'message': {'blocks': [...], 'client_msg_id': '437b2675-6524-4724-a...69a4e0b9f6', 'team': '<tid> ', 'text': '210', 'ts': '1619339414.000200', 'type': 'message', 'user': 'U01SXA059B5'}, 'message_ts': '1619339414.000200', 'response_url': 'https://hooks.slack....tkt5yMCogg', 'team': {'domain': '<domain> ', 'enterprise_id': '<eid> ', 'enterprise_name': '<ename> ', 'id': '<tid> '}, 'token': 'wF8MDfFS8BLd30KFYLT1MlZa', 'trigger_id': '1991796659910.299118...7619ad8bd4', 'type': 'message_action', 'user': {'id': 'U01SXA059B5', 'name': '<uname> ', 'team_id': '<tid> ', 'username': '<uname> '}}
178178 client (AsyncWebClient): an initialzied slack web client to communicate with slack API
179179 logger (Logger): optional logger passed to all handlers
180180 context (AsyncBoltContext): a dictionary added to all handlers which can be used to enrich events with
@@ -309,6 +309,8 @@ async def update_home_tab(
309309 Args:
310310 client (AsyncWebClient): an initialzied slack web client to communicate with slack API
311311 event (dict): payload from slack server for app home opened event
312+ E.g.
313+ {'type': 'app_home_opened', 'user': 'U01SWNKJR6G', 'channel': 'D02FP4JLJ56', 'tab': 'home', 'event_ts': '1632136426.209403'} # pylint: disable=line-too-long
312314 logger (Logger): optional logger passed to all handlers
313315 request (AsyncBoltRequest): entire request payload from slack server
314316 """
@@ -330,3 +332,5 @@ async def update_home_tab(
330332
331333# add the warmup route for aiohttp
332334app .web_app ().add_routes ([web .get ("/_ah/warmup" , warmup )])
335+ # add static /img route for local runs/debugging
336+ app .web_app ().add_routes ([web .static ("/img" , "resources/img" )])
0 commit comments