I want to send uploaded image as sticker in channel. I can't find any source for this. It's my code:
ctx.telegram.getFileLink(photo.file_id).then(url => {
axios({url, responseType: 'stream'}).then(response => {
response.data.pipe(fs.createWriteStream(`images/public/images/${photo.file_id}.png`))
.on('finish', async() => {
ctx.replyWithSticker({source: `images/public/images/${photo.file_id}.png`})
})
.on('error', (e: Error) => {
ctx.reply("An error occured")})
})
})
})
But it sending me this:
Image
Can someone help me? Thanks.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…