some better output

This commit is contained in:
reality 2013-10-28 13:58:58 +00:00
parent d910b116c6
commit 0fa228a749
2 changed files with 11 additions and 5 deletions

View File

@ -1,3 +1,4 @@
{ {
"api_key": "bleh" "api_key": "bleh",
"outputPrefix": "\u00033steam\u000f"
} }

View File

@ -75,9 +75,14 @@ var steam = function(dbot) {
this.api.getRecentlyPlayed(steamid, function(err, games) { this.api.getRecentlyPlayed(steamid, function(err, games) {
if(!err) { if(!err) {
if(games.total_count != 0) { if(games.total_count != 0) {
event.reply(user.currentNick + ' last played ' + games.games[0].name); event.reply(dbot.t('steam_last_played', {
'user': user.currentNick,
'game': games.games[0].name
}));
} else { } else {
event.reply(user.currentNick + ' didn\'t play anything recently'); event.reply(dbot.t('steam_not_played', {
'user': user.currentNick
}));
} }
} else { } else {
event.reply('something went wrong'); event.reply('something went wrong');
@ -102,7 +107,7 @@ var steam = function(dbot) {
if(!user) { if(!user) {
event.reply('Unknown user.'); event.reply('Unknown user.');
} else { } else {
event.reply(user.currentNick + ': Set a steam username with "~set steam username"'); event.reply(user.currentNick + ': Set a steam "vanity url" with "~set steam username"');
} }
callback(true); callback(true);
} }
@ -111,7 +116,7 @@ var steam = function(dbot) {
callback(false); callback(false);
} }
} else { } else {
event.reply(event.user + ': Set a steam username with "~set steam username"'); event.reply(event.user + ': Set a steam "vanity url" with "~set steam username"');
callback(true); callback(true);
} }
}.bind(this); }.bind(this);