我希望创建一个slackbot,当它被要求回答某个问题并听取该特定问题的答案时,只有当它被问到时才会这样。
例如
User: @Hubot Please add a link to youtube
Hubot: @User Can you please post a link to youtube
User: @Hubot youtube.com
Hubot: @User A link to youtube has been added
但是我并不总是倾听要发布的网址,我只希望它在被要求添加网址后听取网址。如果没有向其发送网址,Hubot将在一段时间后超时。
例如
User: @Hubot Please add a link to youtube
Hubot: @User Can you please post a link to youtube
Hubot: @User Timeout: 1min url not added, you will need to add link to youtube again to save
计划是将网站名称和网址保存到大脑,当它要求网站hubot将发布网址时。这只是我遇到麻烦的谈话部分。
答案 0 :(得分:2)
几周前我为Hubot调查了这个功能,但还没有回到实际构建它。这是我计划使用的模块: