diff --git a/plugins/self_care.js b/plugins/self_care.js index 7d353e8..34eaf6a 100644 --- a/plugins/self_care.js +++ b/plugins/self_care.js @@ -28,8 +28,8 @@ function inject (bot) { }) bot.on('system_chat', (message) => { - if (util.isDeepStrictEqual(message, COMMANDSPY_ENABLED_MESSAGE) || util.isDeepStrictEqual(message, COMMANDSPY_ENABLED_MESSAGE_2)) commandSpyEnabled = true - else if (util.isDeepStrictEqual(message, COMMANDSPY_DISABLED_MESSAGE) || util.isDeepStrictEqual(message, COMMANDSPY_DISABLED_MESSAGE_2)) commandSpyEnabled = false + if (message === COMMANDSPY_ENABLED_MESSAGE.text || util.isDeepStrictEqual(message, COMMANDSPY_ENABLED_MESSAGE) || util.isDeepStrictEqual(message, COMMANDSPY_ENABLED_MESSAGE_2)) commandSpyEnabled = true + else if (message === COMMANDSPY_DISABLED_MESSAGE.text || util.isDeepStrictEqual(message, COMMANDSPY_DISABLED_MESSAGE) || util.isDeepStrictEqual(message, COMMANDSPY_DISABLED_MESSAGE_2)) commandSpyEnabled = false }) bot.on('player_added', (player) => {