const platform = {
1: `Мобильная версия сайта`,
2: `iPhone`,
3: `iPad`,
4: `Android`,
5: `Windows Phone`,
6: `Windows 10`,
7: `Полная версия сайта`,
}
function getPlatform(user) {
return smiles[user.last_seen.platform];
}
const user = await vk.api.messages.getConversationMembers({
peer_id: msg.peerId,
fields: 'online, last_seen'
}).then(function(user){
let text = `Онлайн:\n`;
for( i in user.profiles){
if(user.profiles[i].online == 1){
text += `[🔴] x [id${user.profiles[i].id}|${user.profiles[i].first_name} ${user.profiles[i].last_name}][${getPlatform}]\n`
}
}
msg.answer([text])
})
{ count: 1,
items:
[ { peer: [Object],
in_read: 0,
out_read: 0,
last_message_id: 0,
can_write: [Object],
chat_settings: [Object] } ],
profiles:
[ { id: .,
first_name: '.,
last_name: '.',
is_closed: false,
can_access_closed: true,
sex: 2,
screen_name: '.',
photo_50:
'https://sun1-27.userapi.com/c850620/v850620032/16bf56/VCd_zF32a_I.jpg?ava=1',
photo_100:
'https://sun1-14.userapi.com/c850620/v850620032/16bf55/w5jgW-6D6nI.jpg?ava=1',
online: 1,
online_app: 2274003,
online_mobile: 1 },
{ id: 368954072,
first_name: '.',
last_name: '.',
is_closed: false,
can_access_closed: true,
sex: 2,
screen_name: 'pigeon1235',
photo_50:
'https://pp.userapi.com/c851016/v851016188/15708d/r1HHJ2G_2SM.jpg?ava=1',
photo_100:
'https://pp.userapi.com/c851016/v851016188/15708c/bzbIyzCAvIk.jpg?ava=1',
online: 1,
online_app: 2274003,
online_mobile: 1 },
{ id: .,
first_name: '.',
last_name: '.',
is_closed: false,
can_access_closed: true,
sex: 2,
screen_name: '',
photo_50:
'https://sun1-21.userapi.com/c850032/v850032513/121f18/RsZormgZuAw.jpg?ava=1',
photo_100:
'https://sun1-85.userapi.com/c850032/v850032513/121f17/ZUKa2D2w7E4.jpg?ava=1',
online: 1,
online_app: 6604925 } ] }