O
O
Oleg2017-04-09 16:51:27
JavaScript
Oleg, 2017-04-09 16:51:27

How to make javascript/node.js ignore case?

I am writing a bot for VKontakte.
You need to ignore the case when entering a command, you don’t want to write each command in your register with a crutch. For example "hello" "hello" "hello" and so on..

if (msg.body == "Привет" && msg.from_id !== userid)
        msg.send("Привет");

Above is an example command and response.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2017-04-09
@LenovDan

https://developer.mozilla.org/en/docs/Web/JavaScript...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question