vk.updates.hear(/^(?:4)$/i, async (context) => {
axios.get(`https://minecraft-statistic.net/api/server/info/spmini`).then(res => {
let message = '';
if(res.data) {
let place = res.data.place || 0
if(res.data) {
let nickname = res.data.nickname || 0
return context.send (` ${nickname} ${place}:`)}
}
}).catch(err => console.log('api.mcsrvstat.us ошибка:', err))
});
В ответе получаю ${nickname} = 0 ${place} = 0
Хотя должны быть другие значения
Получаю JSON с сайта:
axios.get(`https://minecraft-statistic.net/api/server/info/spmini`)
{"server_id":182507,"page":1,"data":[{"nickname":"Waidelos","place":1,"time":45390,"last_visit":1553199600},{"nickname":"5opka","place":2,"time":34100,"last_visit":1553224805},{"nickname":"Abashev","place":3,"time":32400,"last_visit":1553281814},{"nickname":"K_i_t_n_e_s_s","place":4,"time":31480,"last_visit":1553233206},{"nickname":"mafiozznik","place":5,"time":27600,"last_visit":1553284815},{"nickname":"_kirl","place":6,"time":24830,"last_visit":1553289615},{"nickname":"Estol","place":7,"time":24340,"last_visit":1553291416},{"nickname":"MrBrison","place":8,"time":23520,"last_visit":1553267412},{"nickname":"Nataxa_Ts","place":9,"time":21970,"last_visit":1553188199},{"nickname":"_Sofiya_Star","place":10,"time":21250,"last_visit":1553104785}],"status_query":"ok"}