From: Carl Worth Date: Sat, 26 Sep 2020 04:37:59 +0000 (-0700) Subject: Trim down the program to not have any custom routes X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=48a792277b306568271b37e4dcefe475e6c1d2ae;p=turbot Trim down the program to not have any custom routes I'm just verifying here that I don't need to have these in order to get the Slack challenge verification to work. --- diff --git a/turbot.py b/turbot.py index d447905..1939c08 100755 --- a/turbot.py +++ b/turbot.py @@ -10,16 +10,4 @@ slack_bot_token = os.environ['SLACK_BOT_TOKEN'] slack_events = SlackEventAdapter(slack_signing_secret, "/slack/events") slack_client = WebClient(slack_bot_token) -@slack_events.on("message") -def handle_message(data): - message = data["event"] - if message.get("subtype") is None and "hi" in message.get("text"): - channel = message["channel"] - response = "Hello {}! :tada:".format(message["user"]) - slack_client.chat_postMessage(channel=channel, text=response) - -@slack_events.on("error") -def handle_error(err): - print("ERROR: " + str(err)) - slack_events.start(port=3000)