권은령

update app.js

......@@ -120,7 +120,7 @@ function handleEvent(event)
// ignore non-text-message event
return Promise.resolve(null);
}
else if(event.message.text.substring(0, 5)=='순위 보기')
else if(event.message.text.substring(0, 5)=='차트 보기')
{
// music list 출력
var url="https://www.genie.co.kr/chart/top200";
......@@ -160,8 +160,16 @@ function handleEvent(event)
}
else if(event.message.text.substring(0, 5)=='가사 검색')
{
/*
if(songList[0]==undefined)
{
var result = { type: 'text', text:''};
result.text=""
client.replyMessage(event.replyToken, result);
}
*/
var userNum=event.message.text[6]
var newUrl=songList[userNum].url;
var newUrl=songList[userNum-1].url;
var lyric='';
request(newUrl, function(error, response, html)
......
......@@ -57,4 +57,10 @@ request(url, function(error, response, html)
console.log(songList[randnum].song);
console.log(lyric);
});
})
\ No newline at end of file
})
if(songList[0]==undefined)
{
console.log("hhh");
}
console.log(songList[0]);
\ No newline at end of file
......