Use the JavaScript .toLowerCase() function to convert everything in the message to lower-case and .includes() to check for the matching string in the message when comparing the message to your desired text (read more toLowerCase and includes):
// the time of the last help message
let lastHelpTime = 0
client.on('message', (channel, tags, message, self) => {
const send = message.toLowerCase().includes("!help")
if (!send ) return;
// get the current time
const timeNow = new Date().getTime()
// check if at least 1 minute has elapsed since the last help message
if (timeNow - lastHelpTime > 60 * 1000) {
// update the last help message time
lastHelpTime = timeNow
// post the help message in chat
client.say(channel, `This is the help message`)
}
console.log(`${tags['display-name']}: ${message}`);
});
Example
console.log("!HELP".toLowerCase().includes("!help"))
console.log("!HeLp".toLowerCase().includes("!help"))
console.log("!help".toLowerCase().includes("!help"))
console.log("!hElp mE Bot".toLowerCase().includes("!help"))