GithubHelp home page GithubHelp logo

slackclean's Introduction

Whut?

Delete old messages and files from your Slack workspace.

Setup Slack

  1. Create a new Slack app.

  2. Create a new OAuth Access Token for the app:

  3. Add the following User Token scopes:

    • channels:history - View messages and other content in a user’s public channels
    • channels:read - View basic information about public channels in a workspace
    • chat:write - Send messages on a user’s behalf
    • files:read - View files shared in channels and conversations that a user has access to
    • files:write - Upload, edit, and delete files on a user’s behalf
    • groups:history - View messages and other content in a user’s private channels
    • groups:read - View basic information about a user’s private channels
    • im:history - View messages and other content in a user’s direct messages
    • im:read - View basic information about a user’s direct messages
    • mpim:history - View messages and other content in a user’s group direct messages
    • mpim:read - View basic information about a user’s group direct messages
    • users:read - View people in a workspace

Run

# Delete messages and files posted by `massamun` before May 1, 2020 00:00 UTC,
# in all public, private, multiparty (group) and DM channels.
#
# NOTE: It's a DRY-RUN. Nothing is actually deleted unless you also pass the --commit flag.
#
docker run --rm anrid/slackclean --user massamun --before 20200501-0000 --token xoxp-...

# Delete messages and files posted before May 1, 2020 00:00 UTC, in all public, private,
# multiparty (group) and DM channels where the channel name matches the regexp `/tech/i`.
#
docker run --rm anrid/slackclean --filter tech --before 20200501-0000 --token xoxp-...

Build

docker build -t slackclean -t anrid/slackclean:latest .

slackclean's People

Watchers

Anri Digholm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.