k107
k107

Reputation: 16440

How do I get hubot to list all the users in the current campfire chatroom?

I've got hubot (https://github.com/github/hubot) running in a campfire chatroom.

I'm trying to make a script which shows all of the logged in users in the chatroom.

The default hubot show users command doesn't seem to find all of the logged in users.

non-working pseudocode

module.exports = (robot) ->    
  robot.respond /users$/i, (msg) ->
    for user in robot.room.users
        msg.respond user.name + "is logged in"

Upvotes: 4

Views: 1709

Answers (1)

Larry Cai
Larry Cai

Reputation: 59983

Try to send request via Campfire room API, it will list all the users currently inside the room.

Upvotes: 1

Related Questions