은승우

Update app.js

Showing 1 changed file with 6 additions and 4 deletions
......@@ -84,13 +84,15 @@ async function handleEvent(event) {
return new Promise(async(resolve,reject)=>{
var file;
client.getMessageContent(event.message.id)
.then(async(stream) => {
await client.getMessageContent(event.message.id)
.then(
async(stream) => {
await stream.on('data', (chunk) => {
file=chunk;
file = chunk;
console.log(chunk);
});
});
}
);
console.log(file);
var cheerio = require('cheerio');
var uriBase = 'https://koreacentral.api.cognitive.microsoft.com/vision/v2.1/ocr';
......