[英]Hubot help desk: reply with error if x is not there
我正在給Hubot一個可以與Slack集成的功能,以充當服務台。
到目前為止,腳本(咖啡腳本)會查找關鍵字,如果關鍵字不存在,那么我需要Hubot返回類似“抱歉,我找不到您想要的內容”之類的內容。
以下是關鍵字查詢的示例;
module.exports = (robot) ->
robot.hear /ansible/i, (res) ->
res.send "Hi, for all ansible related querys, please go to
www.github.com/ansible/ansiblehelp"
因此,例如ansible不在問題中,hubot需要回答“對不起,我找不到您想要的東西”。
這可能嗎?
謝謝
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.