/slackbot-starter

A starter for a Slackbot built in TypeScript and node

Primary LanguageTypeScriptMIT LicenseMIT

🤖 Slackbot Starter

A starter for a Slackbot built in TypeScript and node


Table of Contents

  1. Development Environment Setup
  2. Running the Script

Development Environment Setup

Dependencies

  • node: 14.x.x
  • yarn: 1.x.x

Installation

To clone the repo:

git clone https://github.com/charlesdobson/slackbot-starter.git

To install all dependencies:

cd slackbot-starter
yarn

Configuration

  1. Create a .env file at the root
  2. Copy the contents of the .env.example to the new .env file
  3. Generate a Slack webhook string from https://api.slack.com/messaging/webhooks and add it as the SLACK_WEBHOOK environment variable
  4. Determine the Slack token type using https://api.slack.com/authentication/token-types and add it as the SLACK_TOKEN_TYPE environment variable

Running the Script

Development

To run the script and watch for changes:

yarn serve

Production

To run the script only once:

yarn start