Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/gojob-1337/slack-read-only-chan

Read-only slack channels 🤫
https://github.com/gojob-1337/slack-read-only-chan

bot channels read-only slack typescript

Last synced: about 1 month ago
JSON representation

Read-only slack channels 🤫

Awesome Lists containing this project

README

        


Emoji shush
Slack Logo

# Slack read-only channels [![TypeScript](https://badges.frapsoft.com/typescript/version/typescript-next.svg?v=101)](https://www.typescriptlang.org/) [![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.png?v=103)](https://opensource.org/licenses/GPL-3.0/)
>[slack-read-only-chan](https://github.com/gojob-1337/slack-read-only-chan) is a slackbot who turns Slack channels of your designation into read only channels. This bot is great for things posting team updates to a channel, while ensuring that the posts don't get drowned out by ambient channel noise.

## Disclaimer
Neither I, nor any developer who contributed to this project, accept any kind of liability for your use of this bot.

*This package is not endorsed or affiliated with Slack, or Slack.com*

## Getting Started
Clone the repo: `git clone [email protected]:gojob-1337/slack-read-only-chan.git`

### Requirements
* [Node 10.+](https://nodejs.org)
* [Yarn](https://yarnpkg.com)

### Install & Build
```
yarn
yarn build
```

### Prepare
```
cp .env.example .env
nano .env
```

You'll need to configure these environment variables :
```
SLACK_BOT_TOKEN
SLACK_MEGA_TOKEN
AUTHORIZED_USERS
CHANNELS_MESSAGES
```

where:
- `SLACK_BOT_TOKEN` is the bot's token from your Slack app
- `SLACK_MEGA_TOKEN` is the admin/god token of an admin user in Slack
- `AUTHORIZED_USERS` is the ids of users that can post through the bot to the read only channels (separated by commas)
- `CHANNELS_MESSAGES` are the channel ids (and automatic messages) of channels you want the bot to keep as read-only (json format 😅)

### Run
Dev :
```
yarn start
```

Prod :
```
yarn build
node dist/main.js
```