Skip to content

Commit c05f7d6

Browse files
committed
Fix #889 by correcting the team_join event handler
1 parent f50576f commit c05f7d6

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

tutorial/03-responding-to-slack-events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def onboarding_message(payload):
117117
user_id = event.get("user", {}).get("id")
118118

119119
# Open a DM with the new user.
120-
response = slack_web_client.im_open(user_id)
120+
response = slack_web_client.conversations_open(users=user_id)
121121
channel = response["channel"]["id"]
122122

123123
# Post the onboarding message.

tutorial/PythOnBoardingBot/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def onboarding_message(payload):
5252
user_id = event.get("user", {}).get("id")
5353

5454
# Open a DM with the new user.
55-
response = slack_web_client.im_open(user=user_id)
55+
response = slack_web_client.conversations_open(users=user_id)
5656
channel = response["channel"]["id"]
5757

5858
# Post the onboarding message.

tutorial/PythOnBoardingBot/async_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async def onboarding_message(**payload):
5252
user_id = payload["data"]["user"]["id"]
5353

5454
# Open a DM with the new user.
55-
response = web_client.im_open(user_id)
55+
response = web_client.conversations_open(users=user_id)
5656
channel = response["channel"]["id"]
5757

5858
# Post the onboarding message.

0 commit comments

Comments
 (0)