Showing
1 changed file
with
5 additions
and
6 deletions
... | @@ -105,9 +105,9 @@ function handleEvent(event) { | ... | @@ -105,9 +105,9 @@ function handleEvent(event) { |
105 | }); | 105 | }); |
106 | 106 | ||
107 | } | 107 | } |
108 | - else if(isNaN(event.message.text)){ | 108 | + else if(0 < event.message.text.substr(0,2)*1 < 27){ |
109 | 109 | ||
110 | - var selectnum = (event.message.text*1); | 110 | + var selectnum = (event.message.text.substr(0,2)*1); |
111 | 111 | ||
112 | if(selectnum >=0 || selectnum <=27){ | 112 | if(selectnum >=0 || selectnum <=27){ |
113 | result.text = '목록에 존재하지 않는 콘서트입니다.'; | 113 | result.text = '목록에 존재하지 않는 콘서트입니다.'; |
... | @@ -137,11 +137,10 @@ function handleEvent(event) { | ... | @@ -137,11 +137,10 @@ function handleEvent(event) { |
137 | 137 | ||
138 | var temp = body.split(':'); | 138 | var temp = body.split(':'); |
139 | videourl.url += "https://www.youtube.com/watch?v=" + temp1[13].substr(2,11); | 139 | videourl.url += "https://www.youtube.com/watch?v=" + temp1[13].substr(2,11); |
140 | - }); | ||
141 | - | ||
142 | - console.log(videourl.url); | ||
143 | 140 | ||
144 | - client.replyMessage(event.replyToken, videourl).then(resolve).catch(reject); | 141 | + console.log(videourl.url); |
142 | + client.replyMessage(event.replyToken, videourl).then(resolve).catch(reject); | ||
143 | + }); | ||
145 | })}; | 144 | })}; |
146 | 145 | ||
147 | app.post('/webhook', line.middleware(config), (req, res) => { | 146 | app.post('/webhook', line.middleware(config), (req, res) => { | ... | ... |
-
Please register or login to post a comment