Node.js Telegraf从用户处获取图像

Node.js Telegraf从用户处获取图像,node.js,telegram,telegraf,sharp,Node.js,Telegram,Telegraf,Sharp,我想从用户那里得到一张图片,我想用夏普处理这张图片。但在这段代码中,我得到了不受支持的输入错误 bot.on(['sticker', 'photo'], (ctx) => { console.log(ctx.message); sharp(ctx.message.photo) .toColourspace('cmyk') .toFile('output2.jpg') .then(() => { console.log('Conv

我想从用户那里得到一张图片,我想用夏普处理这张图片。但在这段代码中,我得到了不受支持的输入错误

bot.on(['sticker', 'photo'], (ctx) => {
    console.log(ctx.message);
    sharp(ctx.message.photo)
    .toColourspace('cmyk')
    .toFile('output2.jpg')
    .then(() => {
        console.log('Conversion completed!')
});
    return ctx.reply('Done!')
  })
我怎样才能得到这个图像