From f207e7a258b4c50198746cb9371d1cdcc48cc55d Mon Sep 17 00:00:00 2001 From: Sharon Kennedy Date: Wed, 12 Jan 2022 12:05:19 -0500 Subject: [PATCH] add bot command for bug reports --- dist/bot.js | 6 ++++++ src/bot.js | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/dist/bot.js b/dist/bot.js index 9d48e67..dae23e8 100644 --- a/dist/bot.js +++ b/dist/bot.js @@ -276,6 +276,12 @@ class OcrccBot { const message = responses[Math.floor(Math.random() * responses.length)]; this.sendTextMessage(roomId, message, senderId); } + }, { + keyword: 'bug', + function: (senderId, roomId) => { + const message = `Please report the issue at ${this.config.bugReportUrl}`; + this.sendTextMessage(roomId, message, senderId); + } }]; try { diff --git a/src/bot.js b/src/bot.js index f8851f7..aced975 100644 --- a/src/bot.js +++ b/src/bot.js @@ -266,6 +266,13 @@ class OcrccBot { const message = responses[Math.floor(Math.random() * responses.length)]; this.sendTextMessage(roomId, message, senderId); } + }, + { + keyword: 'bug', + function: (senderId, roomId) => { + const message = `Please report the issue at ${this.config.bugReportUrl}` + this.sendTextMessage(roomId, message, senderId); + } } ] try {