gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-01 05:27:09 25 4
gpt4 key购买 nike

我在篝火聊天室中运行了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 发送请求,它将列出当前房间内的所有用户。

关于javascript - 如何让hubot列出当前篝火聊天室中的所有用户?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13275529/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com