From 98d8bde40c2d7a3212e5a1ec02fc29fe183577a0 Mon Sep 17 00:00:00 2001 From: Sourcery AI <> Date: Mon, 18 Dec 2023 11:15:36 +0000 Subject: [PATCH] 'Refactored by Sourcery' --- apigateway/slackbot/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apigateway/slackbot/main.py b/apigateway/slackbot/main.py index ae659f2..458e9c8 100644 --- a/apigateway/slackbot/main.py +++ b/apigateway/slackbot/main.py @@ -55,13 +55,13 @@ def slackbot(request): message = event_data["event"]["message"] user = message.get("user") text = message.get("text") - channel = message["channel"] - # Add your custom logic here to process and respond to the received message # Example: Reply to the message if user and text: reply = f"Thanks for your message, <@{user}>! You said: {text}" + channel = message["channel"] + send_slack_message(channel, reply) # Respond with a 200 status code to acknowledge the event