簡體   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