Answer the question
In order to leave comments, you need to log in
How to forbid entering Cyrillic after the command?
vk.updates.hear(/^(?:мини)\s?([^]+)?/i, (message) => {
if (!message.$match[1]) {
return message.send(`💡 Для того чтобы получить статистику определенного игрока на СП-Мини, введите: МИНИ НИКНЕЙМ`);
}
if (message.$match[1].length > 20) {
return message.send(`⚠Максимальная длина никнейма 20 символов.`);
}
Answer the question
In order to leave comments, you need to log in
if (/[а-яё]/i.test(message.$match[1])) {
// do something
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question