Closed quazzie closed 4 years ago
How can I test this?
async function test() {
const bld = new Client.MessageBuilder()
segments = bld.text('Hello ').bold('World').text('!').toSegments()
const image = fs.readFileSync('c:\image.png');
const image_id = await client.uploadimage(image, 'testimage.png');
client.sendchatmessage('UgzfaJwj2Tg_oqk5EhEp5faABAQ', segments, image_id);
}
Pass buffer as imagefile to upload buffer instead of reading from a file.