3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-24 11:42:36 +01:00

Merge pull request #680 from Scritches/master

Improved error messages for LastFM module.
This commit is contained in:
Luke Slater 2018-09-02 11:54:02 +01:00 committed by GitHub
commit dfdb31b31d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -160,7 +160,7 @@ var lastfm = function(dbot) {
}));
} else {
if(err == 'no_user') {
event.reply('Unknown Last.FM user.');
event.reply(dbot.t('lfm_unknown'));
} else if(err == 'no_listen') {
event.reply(dbot.t('no_listen', { 'user': event.user }));
}
@ -275,7 +275,7 @@ var lastfm = function(dbot) {
}.bind(this));
} else {
if(err == 'no_user') {
event.reply('Unknown Last.FM user.');
event.reply(dbot.t('lfm_unknown'));
} else if(err == 'no_listen') {
event.reply(dbot.t('no_listen', { 'user': event.user }));
}
@ -351,7 +351,7 @@ var lastfm = function(dbot) {
} else {
if(err == 'no_user') {
event.reply('Unknown LastFM user.');
event.reply(dbot.t('lfm_unknown'));
} else if(err == 'no_listen') {
event.reply(dbot.t('no_listen', { 'user': user.currentNick }));
}
@ -479,7 +479,7 @@ var lastfm = function(dbot) {
}));
} else {
if(err == 'no_user') {
event.reply('Unknown Last.FM user.');
event.reply(dbot.t('lfm_unknown'));
} else {
event.reply('Well something went wrong and I don\'t know what it means');
}

View File

@ -28,5 +28,8 @@
},
"lfm_scrobbliest": {
"en": "Users with the most played tracks: "
},
"lfm_unknown": {
"en": "Unknown Last.FM user. Please set your Last.FM user by typing '~set lastfm <name>' where <name> is your Last.FM username."
}
}