Answer the question
In order to leave comments, you need to log in
Make a rights system for commands?
For example, if the user whose id is not recorded in the bot, he will not be able to use it and he will receive an answer about that.
Tried to use Json but didn't work.
vk.updates.hear(/^(?:рассылка)\s?([^]+)?/i, message => {
if(acc.users[user_id(message.user)].level < 4) return;
for(i in acc.users){
vk.api.call('messages.send', {
user_id: acc.users[i].id,
random_id: 100000000,
message: `${message.$match[1]}`
});
}
return message.send(`⚡Сообщения отправлены!`);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question