Ga Min Cha

Update transmessage.js

......@@ -33,4 +33,27 @@ function transMsg(replyMsg){
console.log(transMessage);
}
});
}
\ No newline at end of file
}
var replyMsg = "선수, 시즌, 순위, 리그, 손흥민, 네이마르, 1등"
function transMsg_toEn(replyMsg){
var language = "en";
request.post(
{
url: PAPAGO_URL,
headers: {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'X-Naver-Client-Id': `${PAPAGO_ID}`,
'X-Naver-Client-Secret': `${PAPAGO_SECRET}`
},
body: 'source=ko&target=' + language + '&text=' + replyMsg,
json:true
},(error, response, body) => {
if(!error && response.statusCode == 200) {
let transMessage = body.message.result.translatedText;
console.log(transMessage);
}
});
}
\ No newline at end of file
......