-1

This is my code below, basically i want the bot to check two things. The users message needs to contain "how" + either "doing" or "bread". It works perfectly when i use only "doing" but not when I add the "bread" condition. I need a clean and simple solution for this and hope someone can help me, bc for me thats the most logical way in archiving what i need :D

if(msg.content.includes("how") && msg.content.includes("doing" || "bread") ){

    if(msg.author != token){ 
        msg.lineReply("I am good sir")
        }

}
2
  • 2
    Have you checked what "doing" || "bread" does? Commented Feb 5, 2022 at 3:01
  • i cant find the difference to my code :D u mean without the bracets ? That wouldnt work since i am using the .includes function Commented Feb 5, 2022 at 3:04

1 Answer 1

0

if(msg.content.includes("how") && (msg.content.includes("doing") || msg.content.includes("bread")) ){

    if(msg.author != token){ 
        msg.lineReply("I am good sir")
        }

}

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.