vk.updates.hear(/^(?:qr)\s(.*)/i, async (message) => {
const qr = require('qr-image');
let qr_svg = qr.image(message.$match[1], { type: 'jpeg' });
qr_svg.pipe(require('fs').createWriteStream('qr.png'));
var svg_string = qr.imageSync(message.$match[1], { type: 'png' });
message.sendPhoto(svg_string)
});
vk.updates.hear(/^(?:qr)\s(.*)/i, async (message) => {
const qr = require('qr-image');
let qr_svg = qr.image(message.$match[1], { type: 'jpeg' });
qr_svg.pipe(require('fs').createWriteStream('qr.png'));
var svg_string = qr.imageSync(message.$match[1], { type: 'png' });
message.sendPhotos({ value: svg_string });
});