2
如何让Hubot通过HipChat适配器发送一条直接消息?我尝试了许多不同的选择,但没有成功。Make Hubot向HipChat发送一条消息
module.exports = function (robot) {
robot.respond(/hi/i, function (msg) {
msg.send(msg.message.user.room, 'hi'); // outputs to current room
msg.send(msg.message.user.id, 'hi'); // outputs to current room
msg.send(msg.message.user, 'hi'); // outputs to current room
msg.reply('hi'); // @mentions the user in the current room
msg.reply_to('hi') // no reply_to method though I thought I saw this somewhere
});
};