Skip to content

magicstone1412/slack-cleaner

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slack-cleaner

Bulk delete messages on Slack.

Install

pip install slack-cleaner

Usage

# Delete all messages from a channel
slack-cleaner --token=<TOKEN> --message --channel general

# Delete all messages from a private group
slack-cleaner --token=<TOKEN> --message --group hr

# Delete all messages from a direct message channel
slack-cleaner --token=<TOKEN> --message --direct sherry

# Delete all messages from certain user
slack-cleaner --token=<TOKEN> --message --channel gossip --user johndoe

# Delete all messages from bots (especially flooding CI updates)
slack-cleaner --token=<TOKEN> --message --channel auto-build --bot

# Delete all messages older than 2015/09/19
slack-cleaner --token=<TOKEN> --message --channel general --before 20150919

# Always have a look at help message
slack-cleaner --help

Tips

After the task, a backup file slack-cleaner.<timestamp>.log will be created in current directory.

If any API problem occurred, try --rate=<delay-in-seconds> to reduce the API call rate (which by default is unlimited).

If you see the following warning from urllib3, consider to install missing packages: pip install --upgrade requests[security] or just upgrade your Python to 2.7.9.

InsecurePlatformWarning: A true SSLContext object is not available. 
          This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. 
          For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.

Credits

To all the struggling 😢 startup founders who can only afford free plan.

About

Bulk delete messages on Slack

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%