Giter VIP home page Giter VIP logo

aws-bot's Introduction

aws-bot

Slack chat bot running on Node, built using the Slack Bolt javascript framework

Development

To run the bot locally, first clone the repo, then set the following environment variables:

  • SLACK_BOT_TOKEN - this is found in the Slack API under OAuth & Permissions
  • SLACK_SIGNING_SECRET - this is found in the Slack API under Signing Secret
  • SLACK_APP_TOKEN - this is found in the Slack API under App-Level Tokens

Setting local env vars on Mac

On the terminal from the app's root directory once you have found the appropriate values, run: export SLACK_BOT_TOKEN=xoxb-tokenvalue

export SLACK_SIGNING_SECRET=signingsecretvalue

export SLACK_APP_TOKEN=xapp-tokenvalue

Setting local env vars on Windows

On the terminal from the app's root directory once you have found the appropriate values, run: set SLACK_BOT_TOKEN=xoxb-tokenvalue

set SLACK_SIGNING_SECRET=signingsecretvalue

set SLACK_APP_TOKEN=xapp-tokenvalue

Local Development

It's recommended that you use VS Code during local development.This will let you use Prettier to keep formatting and syntax consistent when you save a file.

You can take advantage of a local development server (with hot reloading) to avoid restarting the app for every change:

# Don't use npm! Only use yarn: https://yarnpkg.com/en/
yarn install
yarn run dev

Adding a new script

To add a new script/function to the bot, create a new script in the src/scripts folder. Then, in src/app.ts (at the bottom of the file), add a call to your new function to pass the app object into it.

Tests

Tests rely on Jest. Tests can be run with the following:

# Run all tests
yarn test

# Run tests for a file or directory (looks for partial Regex matches)
yarn test file-or-directory-name

aws-bot's People

Contributors

erinknight242 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.