我正在构建一个 lex 机器人来响应松弛通道上的消息。bot 对用户在该频道中键入的消息做出了完美的响应,但如果使用chat.postMessageAPI 发送消息,则 lex bot 不会给出任何响应。
我对 azure bot 进行了同样的尝试,并且效果很好。有什么建议么?
这是我正在使用的 api 调用:
request('slack.com/api/chat.postMessage?token='+token+'&channel=DBH3EAK1Q&text=hello&as_user=true',
function (error, response, body) {
console.log(body);
}
});