New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

buddhy-botkit

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buddhy-botkit

A botkit-based Slack bot for Zendesk Inbox

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Buddhy-botkit

A botkit-based Slack bot for Inbox development.

Running

The following environment variables are things you'll need. You can put them in a .env file. You can also use /secrets; a file called /secrets/FOO with content bar is the same as setting FOO=bar in the environment.

  • SLACK_TOKEN - REQUIRED This connects the app to a Slack bot user.
  • BRAIN_JSON_DIR - Stores Buddhy's brain in a directory of JSON files. (Useful for development.) Use ./brain for a clean git status.
  • BRAIN_REDIS_URL - Stores Buddhy's brain in Redis.
  • BING_ACCOUNT_KEY - for Bing search API, including images (and pugs).
  • WUNDERGROUND_KEY - for weather services

Hacking

Pull requests welcome.

Running locally

$ echo 'SHELLBOT=1' >> .env
$ npm install
$ npm run dev

This will start up nodemon, so it'll restart on file changes. You'll interact with the bot using the shell. Type \? to get help on the shell's commands.

If you're running VS Code, you can just hit F5, but you'll have to manually restart when you change something. The shellbot doesn't work so well in this mode, though.

Writing scripts

If you want to write a Buddhy script, here's what you need to know.

First, add a new file under the scripts directory. Every file in there is automatically loaded when the bot starts up. Your script file's module.exports should have these items in it:

  • init - a function that takes a Botkit controller as an argument. This is where you add listeners (using controller.hears) and reply to commands.
  • help - An array of strings, which describe the commands your module implements. This is searched when a user asks the bot for help.
  • web - a function that takes an Express application object as an argument. Here you can add handlers for HTTP endpoints on the bot, for configuration UI, OAuth, or anything else. (Experimental.)

You can export anything else at all, but it'll be ignored by the bot.

To preview what your message will look like in Slack

Use Slack's Message Builder.

Testing

Export testable functions or objects from your module, and write a test module in the tests directory. Run the tests with npm test, which will also run the StandardJS linter.

FAQs

Package last updated on 19 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc