繁体   English   中英

如何让hubot列出当前篝火聊天室中的所有用户?

[英]How do I get hubot to list all the users in the current campfire chatroom?

我在篝火聊天室里运行了hubot(https://github.com/github/hubot)。

我正在尝试制作一个脚本,显示聊天室中所有已登录的用户。

默认的hubot show users命令似乎找不到所有已登录的用户。

非工作伪代码

module.exports = (robot) ->    
  robot.respond /users$/i, (msg) ->
    for user in robot.room.users
        msg.respond user.name + "is logged in"

尝试通过Campfire room API发送请求,它将列出当前房间内的所有用户。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM