【发布时间】:2018-01-08 18:46:53
【问题描述】:
致力于创建一个消息列表,当有人加入公司时,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
【问题讨论】:
标签: coffeescript slack hubot