创建一个消息列表,当有人加入公司时,Hubot可以随机选择这些消息列表以显示在#general频道中。我已将消息部分工作,但它正在任何频道上进行...我怎样才能将其限制为特定频道?更进一步,如果可能的话,想要输入输入的用户名并将其粘贴到句子中。
谢谢!
validWelcome = [
'We have a new kid on the block, Hello!'
'Welcome the newest member to the team!'
'Thanks for joining us!'
'Happy to have you here!'
]
module.exports = (robot) ->
robot.enter (msg) ->
msg.send {room: '#integration-test'}, msg.random validWelcome