The devICT community Slack bot!
Keeper be be ran from both your local CLI, as well as in Docker.
- Run
make build-dev-workspace
- Populate the data in the newly generated
.env
file - You'll need 2 terminals to compile live.
- In one terminal, just run
npm start
- In your other terminal, run
make dev
, which will compile your.ts
files live
- In one terminal, just run
Now you can add commands to Keeper in lib/handlers/keeper.ts
!
- Make sure it's running with
npm start
in one terminal - In another terminal, run
nc localhost 3333
to open a tcp connection to the bot - Type commands and see responses! Try
hello
and you should seekeeper: hello, Human!
in response
NOTE As of now, there is no way to develop locally in docker.
To run your local build, run make build
, then make start
.
Run make stop
to kill the container.
Head into Keeper's Handlers, where you can add your new command, and it's handler.
This file holds all of the command handlers for the commands that Keeper supports. It exports a map, which is the command and their handlers. The KeeperClient then takes this map, and registers all the commands with Slack.
To add your new command, add your command name to the KeeperSlackCommands enum. You can then create your handler in the Keeper's Handlers file, and add it to the exported map. Wallah, your command is now registered with Keeper!