From 21c7cd924b5856712123fafc295fb5f03e7ac52a Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Wed, 9 Dec 2020 21:25:52 -0500 Subject: [PATCH] Fix Feet/Inches display in pokedex --- commands/search/pokedex.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/search/pokedex.js b/commands/search/pokedex.js index f29141ff..a3345511 100644 --- a/commands/search/pokedex.js +++ b/commands/search/pokedex.js @@ -80,7 +80,7 @@ module.exports = class PokedexCommand extends Command { spd: Math.round((data.stats.spd / 255) * 10) * 2, total: Math.round((data.baseStatTotal / 720) * 10) * 2 }; - const feet = Math.floor(data.height / 12); + const feet = Math.round(data.height / 12); const embed = new MessageEmbed() .setColor(0xED1C24) .setAuthor(`#${data.displayID} - ${data.name}`, data.boxImageURL, data.serebiiURL) @@ -90,7 +90,7 @@ module.exports = class PokedexCommand extends Command { `) .setThumbnail(data.spriteImageURL) .addField('❯ Class', firstUpperCase(data.class), true) - .addField('❯ Height', `${feet}'${Math.round(data.height % 12)}"`, true) + .addField('❯ Height', `${feet}'${Math.round(data.height) % 12}"`, true) .addField('❯ Weight', `${data.weight} lbs.`, true) .addField('❯ Types', typesShown.map(variety => { const showParens = variety.name && typesShown.length > 1;