Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chrislgarry/slackterminator

Simple script to delete all of the messages in a slack channel.
https://github.com/chrislgarry/slackterminator

delete messages slack slack-api

Last synced: about 3 hours ago
JSON representation

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

Awesome Lists containing this project

README

        

# SlackTerminator
Delete all of the messages in a Slack channel.

# Dependencies

1. [Slack Python SDK](https://github.com/slackapi/python-slackclient), Slack API token with permissions (see below).
2. [Python](https://www.python.org/)

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](https://github.com/slackapi/python-slackclient).

2. Clone this repo.

# Usage

In this repo, from commandline:

```
export SLACK_API_TOKEN=
user$ python slackterminator.py --help
usage: slackterminator.py [-h] --channel_name

Delete all messages from a given Slack channel.

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