【问题标题】:How do I get hubot to list all the users in the current campfire chatroom?如何让hubot列出当前营火聊天室中的所有用户?
【发布时间】:2012-10-27 20:26:46
【问题描述】:

我在篝火聊天室里运行了 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"

【问题讨论】:

    标签: javascript coffeescript bots hubot campfire


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2014-07-26
      • 2015-12-26
      • 1970-01-01
      • 1970-01-01
      • 2020-11-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多