I'm making a discord bot and I need help with capital sensitivity.?

bot.on('message', msg =>{

    if(msg.content === "hello"){




How do I make it where they can use uppercase/lowercase wherever and it still picks up as the command? like "HELLO" or "Hello" ?

1 Answer

  • 4 weeks ago

    string.toLowerCase() is what I would use. 

    • ...Show all comments
    • Madison4 weeks agoReport

      What would it look like in the context of: bot.on('message', msg =>{
          if(msg.content === " MESSAGE "){

    • Login to reply the answers
Still have questions? Get your answers by asking now.