Showing
1 changed file
with
3 additions
and
2 deletions
... | @@ -105,8 +105,8 @@ async function handleEvent(event) { | ... | @@ -105,8 +105,8 @@ async function handleEvent(event) { |
105 | text=''; | 105 | text=''; |
106 | while(jsonResponse.indexOf('text')!=-1) | 106 | while(jsonResponse.indexOf('text')!=-1) |
107 | { | 107 | { |
108 | - jsonResponse=jsonResponse.substring(jsonResponse.indexOf('text')+6); | 108 | + jsonResponse=jsonResponse.substring(jsonResponse.indexOf('text')+7); |
109 | - text+=jsonResponse.substring(0,jsonResponse.indexOf("}"))+" "; | 109 | + text+=jsonResponse.substring(0,jsonResponse.indexOf("}")-1)+" "; |
110 | 110 | ||
111 | } | 111 | } |
112 | console.log("text:"+text); | 112 | console.log("text:"+text); |
... | @@ -131,6 +131,7 @@ async function handleEvent(event) { | ... | @@ -131,6 +131,7 @@ async function handleEvent(event) { |
131 | if(songList[i].singer!=''){ | 131 | if(songList[i].singer!=''){ |
132 | result+=songList[i].singer+", "+songList[i].song+"\n"; | 132 | result+=songList[i].singer+", "+songList[i].song+"\n"; |
133 | } | 133 | } |
134 | + console.log(result); | ||
134 | } | 135 | } |
135 | client.replyMessage(event.replyToken,result).then(resolve).catch(reject); | 136 | client.replyMessage(event.replyToken,result).then(resolve).catch(reject); |
136 | }); | 137 | }); | ... | ... |
-
Please register or login to post a comment