Be more discerning about when to respond to a chat or cont command

main
Stef Dunlap 2023-03-18 11:57:13 -04:00
parent 103b0f7a2f
commit 61b6f7cdae
1 changed files with 2 additions and 2 deletions

View File

@ -76,8 +76,8 @@ client.on('registered', () => {
client.on('message', async (event) => { client.on('message', async (event) => {
const chatCmd = config.newChatCmd; const chatCmd = config.newChatCmd;
const contCmd = config.contChatCmd; const contCmd = config.contChatCmd;
let is_chat_cmd = event.message.startsWith(chatCmd); let is_chat_cmd = event.message.startsWith(`${chatCmd} `);
let is_cont_cmd = contCmd.length > 0 && event.message.startsWith(contCmd); let is_cont_cmd = contCmd.length > 0 && event.message.startsWith(`${contCmd} `);
if (is_chat_cmd || is_cont_cmd) { if (is_chat_cmd || is_cont_cmd) {
if (context.is_response_in_progress()) { if (context.is_response_in_progress()) {