I can't seem to make this work, I'm just trying to print out the username of people who've just entered
robot.enter (msg) ->
msg.send "#{msg.user.name}"
I'd guess that you're looking at the wrong thing. The Hubot scripting interface isn't exactly documented but notify.coffee
in the examples says this:
module.exports = (robot) ->
robot.hear /@(\w+)/i, (msg) ->
sender = msg.message.user.name.toLowerCase()
#...
So you probably want to look at msg.message
instead of msg
:
robot.enter (msg) ->
msg.send "#{msg.message.user.name}"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With