无法在Hubot中检索用户的用户名
我似乎无法做到这一点,我只是试图打印刚刚input的用户名
robot.enter (msg) -> msg.send "#{msg.user.name}"
我猜你是在看错误的东西。 Hubot脚本接口没有完全logging,但notify.coffee
中的notify.coffee
说明了这一点:
module.exports = (robot) -> robot.hear /@(\w+)/i, (msg) -> sender = msg.message.user.name.toLowerCase() #...
所以你可能想看看msg.message
而不是msg
:
robot.enter (msg) -> msg.send "#{msg.message.user.name}"
- 没有CoffeeScript的TowerJS?
- templateDatavariables返回未定义的帮助函数(docpad.coffeeconfiguration文件)
- asynchronous处理节点中的HTTP请求
- 新的咖啡脚本,运行cakefile时得到产卵ENOENT错误
- 跨用户同步骨干模型状态的最简单方法是什么? Node.js的
- 使用Coffee脚本的Visual Studio代码和Node.js
- Express 3.0 req.flash?
- 如何调整while循环中的variables作用域以匹配CoffeeScript中的所有正则expression式?
- 无法使用'in'运算符来search中的'_id'