Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rokcarl/slack-read-only-bot
Slack read-only bot
https://github.com/rokcarl/slack-read-only-bot
Last synced: 29 days ago
JSON representation
Slack read-only bot
- Host: GitHub
- URL: https://github.com/rokcarl/slack-read-only-bot
- Owner: rokcarl
- Created: 2018-01-29T14:34:16.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-04-06T02:29:25.000Z (over 3 years ago)
- Last Synced: 2024-08-01T06:21:24.773Z (3 months ago)
- Language: Python
- Size: 5.86 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Slack read-only bot
Manage your Slack community by making read-only channels. Only admins can post to read-only channels, other users' messages to read-only channels get deleted and the user gets a friendly reminder from the bot.
# For Slack Admins
1. Create a new app: https://api.slack.com/slack-apps.
2. Go to _Bot Users_ in the navigation and click on the _Add a Bot User_. Enter e.g. `friendly-bot` and save.
3. Go to _OAuth & Permissions_ in the navigation of the app. Under _Scopes_ select the _Send messages as user_ (`chat:write:user`) permission and click on _Save Changes_.
4. On the same page click on the _Install App to Workspace_ button and _authorize_ on the next screen.
5. You are presented with access tokens. Send over two API tokens to the sysadmin. One should start with `xoxb-` and the other with `xoxp-`.
6. Invite the bot to all the read-only channels.# For Sysadmin
1. Create a server and SSH to it.
2. Initialize the system
```
sudo apt update
sudo apt install -y python3-pip monit
pip3 install slackbot
sudo chown ubuntu /srv
cd /srv
git clone https://github.com/rokcarl/slack-read-only-bot.git
cd slack-read-only-bot
pip3 install -r requirements.txt
```
3. Configure settings.
```
cp settings.yml.example settings.yml
vim settings.yml
cp monitrc ~/.monitrc
chmod 0700 ~/.monitrc
```
4. Run monit that will run the bot.
```
monit
```