{"repo": "slackapi/python-slack-sdk", "pull_number": 836, "instance_id": "slackapi__python-slack-sdk-836", "issue_numbers": "", "base_commit": "2defee516b105112af592dc545a376a893345002", "patch": "diff --git a/tutorial/PythOnBoardingBot/app.py b/tutorial/PythOnBoardingBot/app.py\n--- a/tutorial/PythOnBoardingBot/app.py\n+++ b/tutorial/PythOnBoardingBot/app.py\n@@ -1,7 +1,7 @@\n import os\n import logging\n from flask import Flask\n-from slack import WebClient\n+from slack_sdk.web import WebClient\n from slackeventsapi import SlackEventAdapter\n from onboarding_tutorial import OnboardingTutorial\n \ndiff --git a/tutorial/PythOnBoardingBot/async_app.py b/tutorial/PythOnBoardingBot/async_app.py\n--- a/tutorial/PythOnBoardingBot/async_app.py\n+++ b/tutorial/PythOnBoardingBot/async_app.py\n@@ -4,7 +4,8 @@\n import ssl as ssl_lib\n \n import certifi\n-import slack\n+from slack_sdk.web import WebClient\n+from slack_sdk.rtm import RTMClient\n \n from onboarding_tutorial import OnboardingTutorial\n \n@@ -15,7 +16,7 @@\n onboarding_tutorials_sent = {}\n \n \n-async def start_onboarding(web_client: slack.WebClient, user_id: str, channel: str):\n+async def start_onboarding(web_client: WebClient, user_id: str, channel: str):\n # Create a new onboarding tutorial.\n onboarding_tutorial = OnboardingTutorial(channel)\n \n@@ -39,7 +40,7 @@ async def start_onboarding(web_client: slack.WebClient, user_id: str, channel: s\n # ================ Team Join Event =============== #\n # When the user first joins a team, the type of the event will be 'team_join'.\n # Here we'll link the onboarding_message callback to the 'team_join' event.\n-@slack.RTMClient.run_on(event=\"team_join\")\n+@RTMClient.run_on(event=\"team_join\")\n async def onboarding_message(**payload):\n \"\"\"Create and send an onboarding welcome message to new users. Save the\n time stamp of this message so we can update this message in the future.\n@@ -62,7 +63,7 @@ async def onboarding_message(**payload):\n # When a users adds an emoji reaction to the onboarding message,\n # the type of the event will be 'reaction_added'.\n # Here we'll link the update_emoji callback to the 'reaction_added' event.\n-@slack.RTMClient.run_on(event=\"reaction_added\")\n+@RTMClient.run_on(event=\"reaction_added\")\n async def update_emoji(**payload):\n \"\"\"Update the onboarding welcome message after receiving a \"reaction_added\"\n event from Slack. Update timestamp for welcome message as well.\n@@ -91,7 +92,7 @@ async def update_emoji(**payload):\n # =============== Pin Added Events ================ #\n # When a users pins a message the type of the event will be 'pin_added'.\n # Here we'll link the update_pin callback to the 'reaction_added' event.\n-@slack.RTMClient.run_on(event=\"pin_added\")\n+@RTMClient.run_on(event=\"pin_added\")\n async def update_pin(**payload):\n \"\"\"Update the onboarding welcome message after receiving a \"pin_added\"\n event from Slack. Update timestamp for welcome message as well.\n@@ -120,7 +121,7 @@ async def update_pin(**payload):\n # ============== Message Events ============= #\n # When a user sends a DM, the event type will be 'message'.\n # Here we'll link the message callback to the 'message' event.\n-@slack.RTMClient.run_on(event=\"message\")\n+@RTMClient.run_on(event=\"message\")\n async def message(**payload):\n \"\"\"Display the onboarding welcome message after receiving a message\n that contains \"start\".\n@@ -143,7 +144,7 @@ async def message(**payload):\n slack_token = os.environ[\"SLACK_BOT_TOKEN\"]\n loop = asyncio.new_event_loop()\n asyncio.set_event_loop(loop)\n- rtm_client = slack.RTMClient(\n+ rtm_client = RTMClient(\n token=slack_token, ssl=ssl_context, run_async=True, loop=loop\n )\n loop.run_until_complete(rtm_client.start())\ndiff --git a/tutorial/PythOnBoardingBot/onboarding_tutorial.py b/tutorial/PythOnBoardingBot/onboarding_tutorial.py\n--- a/tutorial/PythOnBoardingBot/onboarding_tutorial.py\n+++ b/tutorial/PythOnBoardingBot/onboarding_tutorial.py\n@@ -1,9 +1,6 @@\n class OnboardingTutorial:\n \"\"\"Constructs the onboarding message and stores the state of which tasks were completed.\"\"\"\n \n- # TODO: Create a better message builder:\n- # https://github.com/slackapi/python-slackclient/issues/392\n- # https://github.com/slackapi/python-slackclient/pull/400\n WELCOME_BLOCK = {\n \"type\": \"section\",\n \"text\": {\n", "test_patch": "", "problem_statement": "", "hints_text": "", "created_at": "2020-10-07T06:40:16Z"}