Answer the question
In order to leave comments, you need to log in
Mailing bot VK what's wrong with my code?
I have my own bot where I need to make a newsletter I wrote the code, but it only works for me and for another administrator. Help me please!
cmd.on(/^all\s([^]+)/i, async (message, args, bot) => {
message.user.foolder += 1;
if(message.user.alvl < 5) return;
users.filter(x=> x.id !== 1).map(zz => {
vk.api.messages.send({ user_id: zz.id, message: ` » Объявление от @id${message.user.id}(${message.user.tag}) \n[||]${message.args[1]}[||]`});
});
let people = 0;
for(let id in users) {
vk.api.call('messages.send', {
chat_id: id,
message: ` » Объявление от @id${message.user.id}(${message.user.tag}) \n[||]${message.args[1]}[||]` });
}
return message.send(` || Я успешно сделал рассылку! Посмотрите, как будет видно другим:\n\n[starbotofficial|Star|Bot], Сегодня в ${new Date().getHours()}:${new Date().getMinutes()}:${new Date().getSeconds()}\n"${message.args[1]}"`);
});
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