Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

A quick-and-dirty out-of-office Slack autoreply based on NodeJS

License

Notifications You must be signed in to change notification settings

yongzhenlow/slack-autoreply

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slack Autoreply

Commitizen friendly

A quick-and-dirty out-of-office Slack autoreply based on NodeJS.

example image

Sends an ephemeral message when someone DMs you. Use chat.postMessage if you want to send an actual message.

You'll need NodeJS (tested on 12.15.0) and the Slack legacy token.

Development

Install dependencies

yarn install

Setup environment variables

Clone the .env.example file to .env

cp .env.example .env

Request your Slack legacy token and replace xoxp-your-token in the .env file with it.

Run the app in development mode

yarn start

Production setup

Install pm2

npm install pm2@latest -g

Start the server by running

pm2 start server.js --name your-app-name

Alternatively, for convenience you can create a ecosystem.config.js config file with the following example and simply run pm2 start

module.exports = {
  apps: [
    {
      name: "your-app-name",
      script: "server.js"
    }
  ]
};

The server.js uses the "Require hook" hack, check it out here.

Enjoy!

About

A quick-and-dirty out-of-office Slack autoreply based on NodeJS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published