forked from GitHub/dbot
Return correct head info is related result term is given by UD [Close #341]
This commit is contained in:
parent
3a33c2be04
commit
e667d95ca8
@ -84,7 +84,7 @@ var link = function(dbot) {
|
|||||||
try {
|
try {
|
||||||
var result = JSON.parse(body);
|
var result = JSON.parse(body);
|
||||||
if(_.has(result, 'result_type') && result.result_type != 'no_results') {
|
if(_.has(result, 'result_type') && result.result_type != 'no_results') {
|
||||||
event.reply(query + ': ' + result.list[0].definition.split('\n')[0]);
|
event.reply(result.list[0].word + ': ' + result.list[0].definition.split('\n')[0]);
|
||||||
} else {
|
} else {
|
||||||
event.reply(event.user + ': No definition found.');
|
event.reply(event.user + ': No definition found.');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user