Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hubot-bearychat

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hubot-bearychat - npm Package Compare versions

Comparing version 0.2.4 to 0.3.0

.editorconfig

15

package.json
{
"name": "hubot-bearychat",
"version": "0.2.4",
"version": "0.3.0",
"description": "BearyChat adapter for hubot",

@@ -12,3 +12,2 @@ "main": "./src/bearychat",

"author": "BearyInnovative Technologies, Inc.",
"license": "EPL-1.0",
"repository": {

@@ -21,3 +20,6 @@ "type": "git",

},
"dependencies": {},
"dependencies": {
"bearychat": "^0.1.0",
"ws": "^1.1.1"
},
"peerDependencies": {

@@ -29,4 +31,11 @@ "hubot": ">=2.0"

},
"scripts": {
"build-doc": "markdown-toc -i README.md && markdown-toc -i README_CN.md"
},
"license": "MIT",
"contributors": [
{
"name": "hbc"
},
{
"name": "yuanbohan",

@@ -33,0 +42,0 @@ "email": "yuanbo.han@bearyinnovative.com",

81

README.md

@@ -5,4 +5,32 @@ # hubot-bearychat

#### Creating a new bot
![Development Status](https://img.shields.io/badge/status-0.3.0-green.svg?style=flat-square)
[中文文档](./README_CN.md)
<!-- toc -->
- [5 Minutes Setup](#5-minutes-setup)
* [Step 1. get ya a "hubot token"](#step-1-get-ya-a-hubot-token)
* [Step 2. bootstrap your secret hubot project with yeoman](#step-2-bootstrap-your-secret-hubot-project-with-yeoman)
* [Step 3. copy your hubot token and start it](#step-3-copy-your-hubot-token-and-start-it)
* [Step 4. start chatting with your bot!](#step-4-start-chatting-with-your-bot)
- [Mode](#mode)
* [RTM mode](#rtm-mode)
* [HTTP mode](#http-mode)
- [Configuration](#configuration)
- [LICENSE](#license)
<!-- tocstop -->
## 5 Minutes Setup
### Step 1. get ya a "hubot token"
Go to your team robots page in bearychat.com (your-cool-team.bearychat.com/robots)
and create a hubot. You will get your hubot token inside the bot settings form:
![art/create_hubot.png](art/create_hubot.png)
### Step 2. bootstrap your secret hubot project with yeoman
- `npm install -g hubot coffee-script yo generator-hubot`

@@ -13,16 +41,53 @@ - `mkdir -p /path/to/hubot`

- `npm install hubot-bearychat --save`
- Check out the [hubot docs](https://github.com/github/hubot/tree/master/docs) for further guidance on how to build your bot
#### Testing your bot locally
Also check out the [hubot docs](https://github.com/github/hubot/tree/master/docs)
for further guidance on how to build your bot.
- `HUBOT_BEARYCHAT_TOKENS=TOKEN1,TOKEN2 ./bin/hubot -a bearychat`
### Step 3. copy your hubot token and start it
```shell
$ export HUBOT_BEARYCHAT_TOKENS=token-token-token-here
$ export HUBOT_BEARYCHAT_MODE=rtm
$ ./bin/hubot -a bearychat
```
### Step 4. start chatting with your bot!
![art/bot_chat.png](art/bot_chat.png)
You can also refer [example/](example) for sample setup.
## Mode
### RTM mode
RTM mode uses BearyChat's RTM api and WebSocket as message transport protocol.
In this mode, hubot can receive all messages in real time and hear any messages
from channels it had joined.
To enable RTM mode, you should specify environment variable
`HUBOT_BEARYCHAT_MODE=rtm` before running the hubot.
`hubot-bearychat` uses rtm mode by default.
### HTTP mode
HTTP mode is the legacy message transport protocol. In this mode, hubot can
only receive messages that himself was mentioned (e.g. `@hubot how do you do`),
and you need to set the hubot hosted http service url in the hubot settings form.
To enable HTTP mode, you should specify environment variable
`HUBOT_BEARYCHAT_MODE=http` before running the hubot.
## Configuration
This adapter uses the following environment variables:
Available configurations are injected via environment variables:
- `HUBOT_BEARYCHAT_TOKENS` - these are hubot tokens in BearyChat, multi tokens are separated by comma
| envvar | description |
|:------:|:------------|
| `HUBOT_BEARYCHAT_MODE` | running mode for the hubot, by default is `rtm` |
| `HUBOT_BEARYCHAT_TOKENS` | hubot token, required for running hubot |
## Copyright
## LICENSE
Copyright &copy; Beary Innovative Technologies, Inc.
MIT

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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