在线程中响应松弛工作流程帖子
我的目标是让我的机器人在线程中响应频道中的工作流程帖子。响应将基于工作流程帖子中的内容。例如,工作流程帖子将包含主题:画布数据
,机器人将在线程中响应。这是我当前的机器人脚本,
from slack_bolt import App
from slack_bolt.adapter.socket_mode import SocketModeHandler
token = config("KEY")
app_token = config("App_Token")
app =App(token=token)
@app.message("Topic: Canvas Data")
def something(message, say):
channel = message["channel"]
thread_ts = message["ts"]
text = "Hey! Here are some Canvas Data resources you can send to the client. \n \n• <https://impl.instructuremedia.com/embed/4f3edf4a-4d61-4b70-8279-963af90b207d|Canvas Data Video Overview> \n• <https://community.canvaslms.com/t5/Canvas-Data-Users/Canvas-Data-FAQ/ta-p/251184|Canvas Data FAQ> \n• <https://community.canvaslms.com/t5/Admin-Guide/How-do-I-use-the-Canvas-Data-Portal-for-an-account/ta-p/261|How do I use the Canvas Data Portal for an account> \n• <https://community.canvaslms.com/t5/Admin-Guide/tkb-p/admin#CanvasDataServices|Canvas Data Services Guides>"
say(text=text, channel=channel, thread_ts=thread_ts)
def main():
handler = SocketModeHandler(app, app_token)
handler.start()
if __name__ == "__main__":
main()
我查看了 slack 文档,我认为这是一个模式,但我不确定它是否是或如何对其做出响应。任何帮助将不胜感激。
My goal is to have my bot respond in thread to a workflow post in the channel. The response will be based on what is inside of the workflow post. For example, the workflow post will contain Topic:Canvas Data
and the bot will respond in thread. Here is my current bot script
from slack_bolt import App
from slack_bolt.adapter.socket_mode import SocketModeHandler
token = config("KEY")
app_token = config("App_Token")
app =App(token=token)
@app.message("Topic: Canvas Data")
def something(message, say):
channel = message["channel"]
thread_ts = message["ts"]
text = "Hey! Here are some Canvas Data resources you can send to the client. \n \n• <https://impl.instructuremedia.com/embed/4f3edf4a-4d61-4b70-8279-963af90b207d|Canvas Data Video Overview> \n• <https://community.canvaslms.com/t5/Canvas-Data-Users/Canvas-Data-FAQ/ta-p/251184|Canvas Data FAQ> \n• <https://community.canvaslms.com/t5/Admin-Guide/How-do-I-use-the-Canvas-Data-Portal-for-an-account/ta-p/261|How do I use the Canvas Data Portal for an account> \n• <https://community.canvaslms.com/t5/Admin-Guide/tkb-p/admin#CanvasDataServices|Canvas Data Services Guides>"
say(text=text, channel=channel, thread_ts=thread_ts)
def main():
handler = SocketModeHandler(app, app_token)
handler.start()
if __name__ == "__main__":
main()
I have looked at the slack documenation and I think this is a modal but I am not sure if it is or how to make a response to it. Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论