slack - 如何让 Slack Bot 不回复私人群组中的所有消息?
问题描述
我希望我的机器人只有在有人提到它的名字时才会回应@mybot。
如何做到这一点?
解决方案
For that you need to use the Events API and subscribe to the event app_metion
.
That way your app will receive all message that directly mention your bot with @mybot.
Those messages will be sent as request from Slack to the endpoint provided for receiving events.
推荐阅读
- ios - Apple 付款通知 - 如何从通知中获取最新的pending_renewal_info?
- python - 使用 Python Pandas 删除 CSV 中标题上方的行
- .net - .NET Core 在多个地方更改日期格式
- html - 是否可以将打印样式规则应用于屏幕上的元素?
- android - 如何使用 Flutter 让后台应用每天下午 2 点打开一个对话框?
- r - 如何提取每个 Kmeans 聚类的观测值
- angular - Angular 组件中的两个不同的类
- python - 为每行中最常见的单词写一个新列
- php - 删除附加到 JS 文件的变量
- javascript - Moment JS:如何在当前月份(含)之后获取当前年份的月份名称