forked from GitHub/dbot
stupid sexy trapdoor
This commit is contained in:
parent
a28ec17a6d
commit
956b947a4c
@ -81,7 +81,8 @@ var lastfm = function(dbot) {
|
|||||||
}, function(err, res, body) {
|
}, function(err, res, body) {
|
||||||
if(_.has(body, 'error') && body.error == 6) {
|
if(_.has(body, 'error') && body.error == 6) {
|
||||||
callback('no_user', null);
|
callback('no_user', null);
|
||||||
} else if(_.has(body, 'recenttracks') && !_.isUndefined(body.recenttracks.track[0])) {
|
} else if(_.has(body, 'recenttracks') && _.has(body.recenttracks, 'track')
|
||||||
|
&& !_.isUndefined(body.recenttracks.track[0])) {
|
||||||
callback(null, body.recenttracks.track[0]);
|
callback(null, body.recenttracks.track[0]);
|
||||||
} else {
|
} else {
|
||||||
callback('no_listen', null);
|
callback('no_listen', null);
|
||||||
|
Loading…
Reference in New Issue
Block a user