var TvApi = require('node-lgtv-api');
var imageName = 'screen.jpg';

module.exports = {
    handle: function (ctx, message, sendMessage) {
        var lgTV = ctx.network.lgTV;
        var tvApi = new TvApi(lgTV.host, lgTV.port, lgTV.pairingKey);
        tvApi.authenticate(function (err, sessionKey) {
                if (err) {
                    console.error(err);
                } else {
                    tvApi.takeScreenShot(imageName, function (err, data) {
                        if (err) {
                            console.error(err);
                        } else {
                            ctx.log.debug(message.from.username + ' <- ' + imageName);
                            ctx.bot.sendPhoto(message.from.id, imageName, {caption: 'TV Screen'});
                        }
                    });
                }
            }
        );
    }
};

@@ -155,16 +155,23 @@
 V = ctx.
+config.
 network.

Fix error with TV screen