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
});
};