]> git.cworth.org Git - turbot/commitdiff
Trim down the program to not have any custom routes
authorCarl Worth <cworth@cworth.org>
Sat, 26 Sep 2020 04:37:59 +0000 (21:37 -0700)
committerCarl Worth <cworth@cworth.org>
Sat, 26 Sep 2020 04:37:59 +0000 (21:37 -0700)
I'm just verifying here that I don't need to have these in order to
get the Slack challenge verification to work.

turbot.py

index d4479051e77acfe19331e99953037aeb09288705..1939c080104695adcb080eb6b8a3936f9f89878b 100755 (executable)
--- 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)