diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-16 22:46:12 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-16 22:46:12 +0200 |
| commit | 7a6150f68888df9c110349dbae7173229037d470 (patch) | |
| tree | 196a524fb857b7e5a4df30801c226017bbeffae9 /responses.js | |
| parent | ab3e74687ae926c48f3e13e3eb0703af8e0d3961 (diff) | |
| download | discordbot-7a6150f68888df9c110349dbae7173229037d470.tar.gz discordbot-7a6150f68888df9c110349dbae7173229037d470.zip | |
use participant skill tier on player profile
Diffstat (limited to 'responses.js')
| -rw-r--r-- | responses.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/responses.js b/responses.js index 9945861..b0a9941 100644 --- a/responses.js +++ b/responses.js @@ -108,12 +108,16 @@ module.exports.showUser = async (msg, args) => { continue; } let matches = (await api.searchMatches(ign)).data; - let matchstr = "not available"; - if (matches.length > 0) matchstr = formatMatch(matches[0]); + let matchstr = "not available", + skill_tier = -1; + if (matches.length > 0) { + matchstr = formatMatch(matches[0]); + skill_tier = matches[0].skill_tier; + } let embed = vainsocialEmbed(`${ign} - ${player.shard_id}`, "player/" + ign) .setThumbnail("https://vainsocial.com/images/game/skill_tiers/" + - player.skill_tier + ".png") + skill_tier + ".png") .setDescription("") .addField("Profile", formatPlayer(player), true) .addField("Last match", matchstr + ` |
