Answer the question
In order to leave comments, you need to log in
How to convert minutes to hours?
vk.updates.hear(/^(?:СП Топ-30)$/i, async (context) => {
axios.get(`https://minecraft-statistic.net/api/server/top/145.239.133.118_25565/all/1`).then(res => {
return res.data;
}).then(data => {
let message = '';
data.data.forEach(item => {
data.data.sort((a, b) => b.time - a.time);
message += item.nickname + ' - ' + item.time + ' минут\n';
})
return context.send(`⭐ Топ-30 онлайна СП:\n\n${message}`);
})
});
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