How to delete thread messages on Slack?

Viewed 7840

I am trying to delete lots of messages on Slack. Those messages are in a thread.

Because there are proximately 800 messages to be deleted, so I want to automate the processing.

So far I tried API delete function. I executed the following command:

$ curl -XPOST -d 'token=MY_TOKEN' -d 'channel=MY_CHANNEL' -d 'ts=TS_VALUE' 'https://slack.com/api/chat.delete'

But the command deleted only the root message, not all threading messages.

Also I tried to use slack-cleaner with the following command,

$ slack-cleaner --token '<my_token>' --message --direct '<my_channel>' --user '*'

This resulted in a python error saying

AttributeError: 'dict' object has no attribute 'iteritems'

How can I delete 800 messages in a thread?

0 Answers
Related