Skip to content

Simple script to delete all of the messages in a slack channel.

Notifications You must be signed in to change notification settings

chrislgarry/SlackTerminator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

SlackTerminator

Delete all of the messages in a Slack channel.

Dependencies

  1. Slack Python SDK, Slack API token with permissions (see below).
  2. Python

This script was developed and tested with Slack Python SDK version 1.0.6, Python version 2.7.13.

Slack Permissions

The Slack app tied to the API token must have the necessary permissions for channels.list (to find the ID of the channel), channels.history (get all messages from the channel), and chat.delete (delete messages from the channel).

Install

  1. Install Slack Python SDK.

  2. Clone this repo.

Usage

In this repo, from commandline:

export SLACK_API_TOKEN=<your-slack-api-token>
user$ python slackterminator.py --help
usage: slackterminator.py [-h] --channel_name <channel name without hashtag>

Delete all messages from a given Slack channel.

optional arguments:
  -h, --help            show this help message and exit
  --channel_name <channel name without hashtag>
                        The name of the Slack channel to delete all messages
                        in.

About

Simple script to delete all of the messages in a slack channel.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages