mirror of
https://github.com/reality/dbot.git
synced 2024-12-02 17:09:29 +01:00
dumbass
This commit is contained in:
parent
f2d93d2f18
commit
a1a292846d
@ -21,7 +21,8 @@ var youtube = function(dbot) {
|
|||||||
}),
|
}),
|
||||||
'json': true
|
'json': true
|
||||||
}, function(error, response, body) {
|
}, 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];
|
var v = body.feed.entry[0];
|
||||||
event.reply(dbot.t('yt_video', {
|
event.reply(dbot.t('yt_video', {
|
||||||
'title': v.title['$t'],
|
'title': v.title['$t'],
|
||||||
|
Loading…
Reference in New Issue
Block a user