Answer the question
In order to leave comments, you need to log in
Why doesn't VK show online people?
cmd.on(/^(?:way онлайн1|way online1)$/i, async (message, bot) => {
if(!message.isChat) return message.send(`команда работает только в беседе!`);
vk.api.messages.getConversationMembers({
peer_id: message.peerId,
fields: "online"
}).then(async function (response) {
let text = `Участники онлайн:\n`;
await response.profiles.map(e => {
if(e.id < 1) return;
if(e.online != 0) text += `[id${e.id}|${e.first_name} ${e.last_name}] ${e.online_mobile? "| ": "| "}\n`;
})
return message.reply(`${text}`,{disable_mentions: 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