2012-11-07 28 views
3

我有hubot(https://github.com/github/hubot)在篝火聊天室中運行。如何獲得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" 

回答

1

嘗試通過Campfire room API發送請求時,它會列出當前所有房間內的用戶。

相關問題