Skip to content

gojob-1337/slack-read-only-chan

Repository files navigation

Emoji shush Slack Logo

Slack read-only channels TypeScript Open Source Love

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

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