我想找到线程消息并用 slack-api 删除它
I want to find thread message and delete it with slack-api
可以通过im.history
和converstation.history
等方法找到私信或私信。
如何查找跟贴消息?我想找到线程消息并删除它们。
查找线程消息
您需要使用 conversations.history
方法来检索线程的父消息。
然后 conversations.replies
方法检索线程,包括父消息的所有线程消息。
您可以通过查看 ts
和 thread_ts
属性来检测父消息:
When a message has a thread_ts value and it matches the same message's
ts, the message is a thread parent.
更多信息请查看官方文档:Finding message threads in the wild
正在删除线程消息
您可以使用 chat.delete
方法像删除普通消息一样删除线程消息。
可以通过im.history
和converstation.history
等方法找到私信或私信。
如何查找跟贴消息?我想找到线程消息并删除它们。
查找线程消息
您需要使用 conversations.history
方法来检索线程的父消息。
然后 conversations.replies
方法检索线程,包括父消息的所有线程消息。
您可以通过查看 ts
和 thread_ts
属性来检测父消息:
When a message has a thread_ts value and it matches the same message's ts, the message is a thread parent.
更多信息请查看官方文档:Finding message threads in the wild
正在删除线程消息
您可以使用 chat.delete
方法像删除普通消息一样删除线程消息。