mirror of
https://github.com/reality/dbot.git
synced 2024-12-24 03:33:07 +01:00
stupid sexy trapdoor
This commit is contained in:
parent
a28ec17a6d
commit
956b947a4c
@ -81,7 +81,8 @@ var lastfm = function(dbot) {
|
||||
}, function(err, res, body) {
|
||||
if(_.has(body, 'error') && body.error == 6) {
|
||||
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]);
|
||||
} else {
|
||||
callback('no_listen', null);
|
||||
|
Loading…
Reference in New Issue
Block a user