From 1c66d15a7476ed3931737ab4c50f28d89000df4d Mon Sep 17 00:00:00 2001 From: emmacallahan Date: Mon, 15 Jul 2019 15:55:17 +0200 Subject: [PATCH] Update 160604-build-first-slack-bot-python.markdown The changes are necessary for slackclient v2.x --- content/posts/160604-build-first-slack-bot-python.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/posts/160604-build-first-slack-bot-python.markdown b/content/posts/160604-build-first-slack-bot-python.markdown index 78fbb4590..b0dbfb988 100644 --- a/content/posts/160604-build-first-slack-bot-python.markdown +++ b/content/posts/160604-build-first-slack-bot-python.markdown @@ -113,7 +113,7 @@ named `starterbot.py` and include the following code in it. import os import time import re - from slackclient import SlackClient + from slack import WebClient With our dependencies imported we can use them to obtain the environment @@ -121,7 +121,7 @@ variable values and then instantiate the Slack client. # instantiate Slack client - slack_client = SlackClient(os.environ.get('SLACK_BOT_TOKEN')) + slack_client = WebClient(os.environ.get('SLACK_BOT_TOKEN')) # starterbot's user ID in Slack: value is assigned after the bot starts up starterbot_id = None