Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -53,13 +53,13 @@ const api_connect = (event) => { | ... | @@ -53,13 +53,13 @@ const api_connect = (event) => { |
53 | return new Promise((resolve, reject) => { | 53 | return new Promise((resolve, reject) => { |
54 | if (event.type !== 'message' || event.message.type !== 'text'){ | 54 | if (event.type !== 'message' || event.message.type !== 'text'){ |
55 | //언어 감지 option | 55 | //언어 감지 option |
56 | + reject(new Error('메세지 혹은, 텍스트가 아닙니다.')); | ||
57 | + } else { | ||
56 | resolve({ | 58 | resolve({ |
57 | url : languagedetect_api_url, | 59 | url : languagedetect_api_url, |
58 | form : {'query': event.message.text}, | 60 | form : {'query': event.message.text}, |
59 | headers: {'X-Naver-Client-Id': client_id, 'X-Naver-Client-Secret': client_secret} | 61 | headers: {'X-Naver-Client-Id': client_id, 'X-Naver-Client-Secret': client_secret} |
60 | }); | 62 | }); |
61 | - } else { | ||
62 | - reject(new Error('메세지 혹은, 텍스트가 아닙니다.')); | ||
63 | } | 63 | } |
64 | }) | 64 | }) |
65 | } | 65 | } | ... | ... |
-
Please register or login to post a comment