From 7a6150f68888df9c110349dbae7173229037d470 Mon Sep 17 00:00:00 2001 From: schneefux Date: Sun, 16 Apr 2017 22:46:12 +0200 Subject: use participant skill tier on player profile --- responses.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'responses.js') 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 + ` -- cgit v1.3.1