은승우

Update app.js

Showing 1 changed file with 3 additions and 2 deletions
......@@ -83,14 +83,15 @@ async function handleEvent(event) {
else if (event.type == 'message'&& event.message.type == 'image') {
return new Promise(async(resolve,reject)=>{
var file;
while(file!=undefined)
{
client.getMessageContent(event.message.id)
.then((stream) => {
stream.on('data', (chunk) => {
file=chunk;
});
});
console.log(file);
}
var cheerio = require('cheerio');
var uriBase = 'https://koreacentral.api.cognitive.microsoft.com/vision/v2.1/ocr';
var options = {
......