abstract class B {
abstract test(): void;
handle(): void {
this.test();
}
}
class A extends B {
test(): void {}
}
let icon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAnUlEQVR42u3bMQ7AIAgAQP//afuE1hSw1CNhccFcIoPimHOOk3MAAADgLrNiVx0AAAC8A8hqSFF1AFQBZB+B1ToAAADYC5DVBKPWAVQBZB8BAAAA9AI4vgkCeLgxAAAAAAAAAAAAAAAAAAAAAAAAAAAAuBQF4GEEAAAA3QBMiJwKsBoAAADoDVA1LA3gawBRAQAAgB4Afo4CAPDfvABS2dwbcpzXlAAAAABJRU5ErkJggg==';
const iconBuffer = Buffer.from(icon.replace('data:image/png;base64,', ''), 'base64');
context.sendPhoto(iconBuffer, {message: `test`});
vk.updates.hear(/^(?:4)$/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) => a.place - b.place);
message += item.nickname + ' - Место ' + item.place + '\n';
})
return context.send(message);
})
});