Slack api 中有什么方法可以在用户每次开始与机器人的新对话时发送消息吗?

Is there any way in Slack api to send a message everytime the user starts a new conversation with a bot?

我正在使用 python 开发一个 slackbot。它已经启动 运行。但我希望它在每次有人开始与它的新对话时发送一条问候消息。在 slack python api 中有什么方法可以检测对话的开始吗?

还没有尝试过任何东西。

我希望我的机器人在每次新用户与它开始新对话时发送问候消息。内置在 slack 中的原始 Slackbot 可以做到这一点。

我认为事件类型 app_home_opened 就是您要找的。

This app event notifies your app when a user has entered into the App Home space—that's the place where a user exchanges DMs with your app.

(...)

Use the app_home_opened event to begin a friendly onboarding flow from your app, a whimsical welcome message, or a deep-dive into a detailed dialog. Since the app_home_opened event is only sent to your app when a user has already clicked on your app, you can rest assured that your attentions are welcome.