Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/chrislgarry/slackterminator
- Owner: chrislgarry
- Created: 2017-07-20T05:17:01.000Z (over 7 years ago)
- Default Branch: chrislgarry-dev
- Last Pushed: 2017-07-26T06:10:07.000Z (over 7 years ago)
- Last Synced: 2024-05-01T20:49:14.354Z (6 months ago)
- Topics: delete, messages, slack, slack-api
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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_nameDelete 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.
```