2
votes

I am confused about sending image attachment for skype bot in nodejs. I also tried the testbot code in github but it did not send any image on skype conversation. Anyone has send image from skype bot? It will be great if you can share your solution.

2

2 Answers

2
votes

Sending an image through Skype Bot is not documented but it is possible and works. Use this code;

var options = {string: true};

            base64.base64encoder("YOUR-IMAGE-LINK", options, function (err, image) {
                if (err) {
                    console.log(err);
                }
                {
                  var originaldata = new Buffer(image, 'base64');
                  bot.replyWithAttachment("Result" , "Image" , originaldata);
                }
            });

You need to install this to run above code; https://www.npmjs.com/package/node-base64-image

If you don't want to install it what you need to is convert your image to binary buffer, and send it to bot with replyWithAttachment method. I found it while going through the Skype SDK code.

-1
votes

The Skype SDK for Node.js doesn't support sending image attachments yet.