diff --git a/main.py b/main.py index 1bc78a6..6ce7ee6 100644 --- a/main.py +++ b/main.py @@ -56,24 +56,24 @@ def main() -> None: event_handling = wrap.handle_events() passive_handling = wrap.run_passives() both = asyncio.gather(event_handling, passive_handling) - - wrap.send_message("test", "#botzone", blocks=[ - { - "type": "actions", - "block_id": "test_block_id", - "elements": [ - { - "type": "button", - "action_id": "test_action_id", - "text": { - "type": "plain_text", - "text": "Send payload", - "emoji": False - } - } - ] - } - ]) + # + # wrap.send_message("test", "#botzone", blocks=[ + # { + # "type": "actions", + # "block_id": "test_block_id", + # "elements": [ + # { + # "type": "button", + # "action_id": "test_action_id", + # "text": { + # "type": "plain_text", + # "text": "Send payload", + # "emoji": False + # } + # } + # ] + # } + # ]) event_loop.run_until_complete(both) diff --git a/slack_util.py b/slack_util.py index 03fa9c7..0d16fe3 100644 --- a/slack_util.py +++ b/slack_util.py @@ -275,11 +275,11 @@ class ClientWrapper(object): async def interr(request: web.Request): if request.can_read_body: # Get the payload - body_dict = await request.json() - payload = body_dict["payload"] print("Got a normal request: {}".format(request)) print(await request.read()) print("Interaction received: {}".format(payload)) + body_dict = await request.json() + payload = body_dict["payload"] # Handle each action separately if "actions" in payload: @@ -306,8 +306,6 @@ class ClientWrapper(object): # Respond that everything is fine return web.Response(status=200) else: - print("Got a weird request: {}".format(request)) - print(await request.read()) # If we can't read it, get mad return web.Response(status=400)