按钮在机器人回复中工作,但在 mochawesome 中 #bot 回复未定义
示例会议 #bot 按钮别针邮件
#me 别针邮件
#bot 按钮拾取|返回菜单
#me 接
但在莫奇真棒机器人响应中未定义 我正在使用
Botium-cli Run Mochawesome。
截图莫奇真棒对话日志
目前,Botium CLI 中的 mochawesome 报告器仅适用于文本消息。
请参阅 Github 存储库:
...
const messageLog = []
const attachmentsLog = []
const listenerMe = (container, msg) => {
messageLog.push('#me: ' + msg.messageText)
if (msg.attachments) attachmentsLog.push(...msg.attachments)
}
const listenerBot = (container, msg) => {
messageLog.push('#bot: ' + msg.messageText)
if (msg.attachments) attachmentsLog.push(...msg.attachments)
}
const listenerAttachments = (container, attachment) => {
attachmentsLog.push(attachment)
}
driver.on('MESSAGE_SENTTOBOT', listenerMe)
driver.on('MESSAGE_RECEIVEDFROMBOT', listenerBot)
driver.on('MESSAGE_ATTACHMENT', listenerAttachments)
...