1
2
3
4
5
async function IMAGE(file, options = {}) {
const imgSeg = segment.image(file)
imgSeg.sub_type = options.isface ? 1 : 0
return imgSeg
}

示例

1
2
3
4
5
// 发送表情包
await IMAGE(fileUrl,{isface : true})

// 发送图片
await IMAGE(fileUrl,{isface : false})