kfei / slack-cleaner

:speech_balloon: Bulk delete messages and files on Slack
MIT License
1.24k stars 144 forks source link

Delete message a certain BOT? #2

Open magicstone1412 opened 8 years ago

magicstone1412 commented 8 years ago

Your application is great! It works like a charm. I have a special case I use some different BOT in a channel. How can I delete messages of certain BOT? Again, thank you very much

kfei commented 8 years ago

Currently there is no argument to specify this. But if you try to delete all messages on a channel with certain BOT's API key, it'll just delete messages of that BOT (since the API key does not have any privilege on others messages. Of course any PR for this feature will be appreciated! :)

Thank you!

TD-4242 commented 8 years ago

This doesn't work for App BOTs (such as the jenkins integration) as they don't have permissions to delete any messages.

https://api.slack.com/bot-users

jxramos commented 3 years ago

Supporting deleting messages from a bot that match a certain pattern in the body of the message would be powerful too. Basically a conditional delete. I guess we could always query first and delete iteratively too.

This is some great python tooling though digging into slack to clean things up. Great work.