3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-30 16:09:27 +01:00
This commit is contained in:
reality 2013-07-19 20:20:59 +00:00
parent f2d93d2f18
commit a1a292846d

View File

@ -21,7 +21,8 @@ var youtube = function(dbot) {
}),
'json': true
}, function(error, response, body) {
if(_.isObject(body) && _.has(body, 'feed') && _.has(body.feed, 'entry')) {
if(_.isObject(body) && _.has(body, 'feed') && _.has(body.feed,
'entry') && _.has(body.feed.entry[0], 'yt$statistics')) {
var v = body.feed.entry[0];
event.reply(dbot.t('yt_video', {
'title': v.title['$t'],