Answer the question
In order to leave comments, you need to log in
Why can't I find the number I need in the message?
And so, good afternoon.
My main problem is that my code can't recognize the numbers in message:
if (message.content.split("1")) { points = 10; console.log("first rule"); }
else if (message.content.split("2")) { points = 10; console.log("second rule"); }
else if (message.content.split("3")) { points = 20; console.log("third rule"); }
else if (message.content.split("4")) { points = 20; }
Answer the question
In order to leave comments, you need to log in
message.content included one in the person's id, which is why the first if always worked.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question