简体   繁体   English

SLACK API ) 如何在消息 Url 中获取时间戳?

[英]SLACK API ) how can i get TimeStamp in Message Url?

i want to make command like '/deleteMessage (URL)' so i tried to use SlackAPI- chat.delete我想发出类似“/deleteMessage (URL)”的命令,所以我尝试使用 SlackAPI -chat.delete

but it needs timestamp, no url但它需要时间戳,没有 url

how can i convert url to timestamp?如何将 url 转换为时间戳?

so, i want this所以,我想要这个

input >> url of message输入 >> url 的消息

output >> timestamp of message output >> 消息的时间戳

The digits at the end of a Slack message URL is the timestamp of the message. Slack 消息末尾的数字 URL 是消息的时间戳。 You'll need to add a period six digits from the right and you can use this to delete your message via chat.delete .您需要从右边添加一个六位数字的句点,您可以使用它通过chat.delete删除您的消息。

As an example, for this URL: https://your-own-workspace.slack.com/archives/CA912334S/p1675234624350123 .例如,对于这个 URL: https://your-own-workspace.slack.com/archives/CA912334S/p1675234624350123

The timestamp would be 1675234624.350123 .时间戳将为1675234624.350123

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM