cmd.hear(/^(?:screen)/i, async (msg) => {
let args = msg.$match;
const { upload } = vk
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto(args);
await page.screenshot({ path: 'result.png' });
await Promise.all([
vk.upload.messagePhoto({
source: {
value: './result.png'
}
})
])
msg.sendPhotos({
value: './result.png'
})
await browser.close();
})