![](/img/trans.png)
[英]Discord.js: how do I get all the users who react to a message with a specific emoji, then set the list of users to a variable?
[英]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.