如何解决如何在 Telegram 中将上传的图像作为贴纸发送? 电报图书馆
我想在频道中将上传的图片作为贴纸发送。我找不到任何来源。这是我的代码:
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")})
})
})
})
但它给我发了这个:
有人可以帮我吗?谢谢。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。