이유혁

replying message modify

Showing 1 changed file with 8 additions and 8 deletions
......@@ -86,25 +86,25 @@ const option_maker = (api_connector, event) => {
if (detect_body.langCode == 'ko') {
target = 'en';
switch (event.message.text.slice(-3)) {
case ':cn':
case '.cn':
target = 'zh-CN';
break;
case ':tw':
case '.tw':
target = 'zh-TW';
break;
case ':es':
case '.es':
target = 'es';
break;
case ':fr':
case '.fr':
target = 'fr';
break;
case ':vi':
case '.vi':
target = 'vi';
break;
case ':th':
case '.th':
target = 'th';
break;
case ':id':
case '.id':
target = 'id';
break;
default:
......@@ -116,7 +116,7 @@ const option_maker = (api_connector, event) => {
var options = {
url: translate_api_url,
form: {'source':detect_body.langCode, 'target': target, 'text':event.message.text},
form: {'source':detect_body.langCode, 'target': target, 'text':event.message.text.slice(0,-3)},
headers: {'X-Naver-Client-Id': client_id, 'X-Naver-Client-Secret': client_secret}
};
resolve(options);
......