은승우

Update app.js

Showing 1 changed file with 6 additions and 3 deletions
......@@ -82,7 +82,8 @@ function handleEvent(event) {
}
else if (event.type == 'message'&& event.message.type == 'image') {
return new Promise((resolve,reject)=>{
console.log("!");
client.replyMessage(event.replyToken,event.message.image).then(resolve).catch(reject);
/*console.log("!");
var cheerio = require('cheerio');
let subscriptionKey = process.env['COMPUTER_VISION_SUBSCRIPTION_KEY'];
......@@ -105,7 +106,7 @@ function handleEvent(event) {
request.post(options, function (error, response, body) {
var data=JSON.stringify(body);
var text='';
console.log("data:"+data);
console.log(data);
while(data.indexOf('text\\')!=-1)
{
data=data.substring(data.indexOf('text\\')+9);
......@@ -137,8 +138,10 @@ function handleEvent(event) {
}
client.replyMessage(event.replyToken,result).then(resolve).catch(reject);
});
});
});*/
})
}
else if(event.type == 'message' && event.message.type == 'text')
......