은승우

Update app.js

Showing 1 changed file with 9 additions and 7 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 stream.on('data', (chunk) => {
file=chunk;
console.log(chunk);
});
});
await client.getMessageContent(event.message.id)
.then(
async(stream) => {
await stream.on('data', (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';
......