은승우

Update app.js

Showing 1 changed file with 3 additions and 2 deletions
......@@ -105,8 +105,8 @@ async function handleEvent(event) {
text='';
while(jsonResponse.indexOf('text')!=-1)
{
jsonResponse=jsonResponse.substring(jsonResponse.indexOf('text')+6);
text+=jsonResponse.substring(0,jsonResponse.indexOf("}"))+" ";
jsonResponse=jsonResponse.substring(jsonResponse.indexOf('text')+7);
text+=jsonResponse.substring(0,jsonResponse.indexOf("}")-1)+" ";
}
console.log("text:"+text);
......@@ -131,6 +131,7 @@ async function handleEvent(event) {
if(songList[i].singer!=''){
result+=songList[i].singer+", "+songList[i].song+"\n";
}
console.log(result);
}
client.replyMessage(event.replyToken,result).then(resolve).catch(reject);
});
......