Delete old slack messages at a specific channel.
- Runtime: Python 3.x
- Replace
******
at line 12 ondelete_messages.py
to your slack API token.
$ python3 delete_messages.py CHANNEL_ID
You can specify multiple channel ids with following JSON data.
{
"target_ch_ids": [
"CHANNEL_1",
"CHANNEL_2",
"CHANNEL_3"
]
}
@0z4ck
Thank you for your comment!
This script deletes messages that posted over specific time ago. For example, a week has 604800 seconds. So this script deletes messages that meets a condition bellow:
this means bellow:
Due to that, the equation at line 21 is correct.
I'm sorry that the writing style is a little complicated.
Thanks.