forked from GitHub/dbot
tings
This commit is contained in:
parent
7f2d813c8c
commit
9d48917d09
@ -12,12 +12,12 @@ var lastfm = function(dbot) {
|
|||||||
this.commands = {
|
this.commands = {
|
||||||
'~listening': function(event) {
|
'~listening': function(event) {
|
||||||
dbot.api.profile.getProfileByUUID(event.rUser.id, function(profile) {
|
dbot.api.profile.getProfileByUUID(event.rUser.id, function(profile) {
|
||||||
if(profile && _.has(profile.profile, 'lastfm')) {
|
if(profile && profile.profile,lastfm != null) {
|
||||||
profile = profile.profile;
|
profile = profile.profile;
|
||||||
request.get(this.ApiRoot, {
|
request.get(this.ApiRoot, {
|
||||||
'qs': {
|
'qs': {
|
||||||
'user': profile.lastfm,
|
'user': profile.lastfm,
|
||||||
'limit': 1,
|
'limit': 2,
|
||||||
'nowplaying': true,
|
'nowplaying': true,
|
||||||
'method': 'user.getrecenttracks',
|
'method': 'user.getrecenttracks',
|
||||||
'api_key': this.config.api_key,
|
'api_key': this.config.api_key,
|
||||||
|
Loading…
Reference in New Issue
Block a user