From 61b6f7cdae34eec55edbda2317a7931649870772 Mon Sep 17 00:00:00 2001 From: Stef Dunlap Date: Sat, 18 Mar 2023 11:57:13 -0400 Subject: [PATCH] Be more discerning about when to respond to a chat or cont command --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 8734ec7..7f5b28e 100755 --- a/index.js +++ b/index.js @@ -76,8 +76,8 @@ client.on('registered', () => { client.on('message', async (event) => { const chatCmd = config.newChatCmd; const contCmd = config.contChatCmd; - let is_chat_cmd = event.message.startsWith(chatCmd); - let is_cont_cmd = contCmd.length > 0 && event.message.startsWith(contCmd); + let is_chat_cmd = event.message.startsWith(`${chatCmd} `); + let is_cont_cmd = contCmd.length > 0 && event.message.startsWith(`${contCmd} `); if (is_chat_cmd || is_cont_cmd) { if (context.is_response_in_progress()) {