hubot-bearychat
Advanced tools
Comparing version 0.6.0 to 0.7.0
---- | ||
- Name: hubot-bearychat | ||
---- | ||
# 0.7.0 / 2017-06-07 | ||
## Added | ||
- 支持 `robot.messageRoom` 方法 | ||
# 0.6.0 / 2017-05-16 | ||
@@ -5,0 +12,0 @@ |
{ | ||
"name": "hubot-bearychat", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "BearyChat adapter for hubot", | ||
@@ -5,0 +5,0 @@ "main": "./src/bearychat", |
@@ -101,8 +101,8 @@ # hubot-bearychat | ||
### at 回复 `Reply` | ||
### 回复 `Reply` | ||
如果 hubot 在回复消息的同时想要提及消息作者,可以使用 `res.reply`: | ||
如果 hubot 在回复消息的同时想要引用作者的消息,可以使用 `res.reply`: | ||
``` | ||
robot.hear 'how old are you?', (res) -> | ||
robot.hear /how old are you?/, (res) -> | ||
res.reply 'I am Five!' | ||
@@ -113,2 +113,11 @@ ``` | ||
### 向其他讨论组发消息 | ||
如果想让 Hubot 往非当前对话的讨论组发送消息可以使用 `robot.messageRoom`, 参数是 vchannelId,讨论组名称也即将支持。 | ||
``` | ||
robot.hear /voldemort/i, (res) -> | ||
robot.messageRoom(vchannel_id, "Somebody is talking about you, Voldemort!") | ||
``` | ||
### 富文本回复 `bearychat.attachment` | ||
@@ -119,3 +128,3 @@ | ||
``` | ||
robot.respond '念两句诗', (res) -> | ||
robot.respond /念两句诗/, (res) -> | ||
robot.emit 'bearychat.attachment', | ||
@@ -122,0 +131,0 @@ # required |
@@ -109,6 +109,6 @@ # hubot-bearychat | ||
If hubot want to response a message and mention the caller, use `res.reply`: | ||
If hubot want to response a message and refer the caller`s message, use `res.reply`: | ||
``` | ||
robot.hear 'how old are you?', (res) -> | ||
robot.hear /how old are you?/, (res) -> | ||
res.reply 'I am Five!' | ||
@@ -119,2 +119,11 @@ ``` | ||
### Send message to other room | ||
If you want to send a message to other channel use `robot.messageRoom` with vchannel_id, and Channel Name support is coming soon: | ||
``` | ||
robot.hear /voldemort/i, (res) -> | ||
robot.messageRoom(vchannel_id, "Somebody is talking about you, Voldemort!") | ||
``` | ||
### `bearychat.attachment` | ||
@@ -125,3 +134,3 @@ | ||
``` | ||
robot.respond '念两句诗', (res) -> | ||
robot.respond /念两句诗/, (res) -> | ||
robot.emit 'bearychat.attachment', | ||
@@ -128,0 +137,0 @@ # required |
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
126732
159
16