From 875d0d29fef1713a72ecc3901a6a3adc286e11e0 Mon Sep 17 00:00:00 2001 From: b2r66sun Date: Thu, 2 Jan 2025 22:17:10 +0800 Subject: [PATCH] fix: :bug: Fix string bug --- src/wechaty/sendMessage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wechaty/sendMessage.js b/src/wechaty/sendMessage.js index 8ee3d61..bc83778 100644 --- a/src/wechaty/sendMessage.js +++ b/src/wechaty/sendMessage.js @@ -49,11 +49,11 @@ export async function defaultMessage(msg, bot, ServiceType = 'GPT') { if (isBotSelf) { console.log('👑👑👑 / self content: ', content) - if (content == startPrompt) { + if (content === startPrompt) { enabled = true await contact.say("🔥 Bot Enabled.") } - if (content == endPrompt) { + if (content === endPrompt) { enabled = false await contact.say("🔵 Bot Disabled.") }