forked from GitHub/dbot
translate module
This commit is contained in:
parent
266f6b58f4
commit
fd1a76d3bc
@ -44,6 +44,9 @@ var translate = function(dbot) {
|
||||
|
||||
for(var i=0;i<results.length && i < 3;i++) {
|
||||
translation = results[i];
|
||||
if(!_.has(translation.phrase, 'text')) {
|
||||
continue;
|
||||
}
|
||||
aString = (i+1) + '. ' + translation.phrase.text;
|
||||
if(_.has(translation, 'meanings') && translation.meanings.length > 0) {
|
||||
aString += ' (' + _.unique(_.pluck(translation.meanings, 'text')).join(', ') + ')';
|
||||
|
Loading…
Reference in New Issue
Block a user