mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 00:07:36 +02:00
Fix feet/inches in pokedex
This commit is contained in:
@@ -80,7 +80,7 @@ module.exports = class PokedexCommand extends Command {
|
|||||||
spd: Math.round((data.stats.spd / 255) * 10) * 2,
|
spd: Math.round((data.stats.spd / 255) * 10) * 2,
|
||||||
total: Math.round((data.baseStatTotal / 720) * 10) * 2
|
total: Math.round((data.baseStatTotal / 720) * 10) * 2
|
||||||
};
|
};
|
||||||
const feet = Math.round(data.height / 12);
|
const feet = Math.floor(data.height / 12);
|
||||||
const embed = new MessageEmbed()
|
const embed = new MessageEmbed()
|
||||||
.setColor(0xED1C24)
|
.setColor(0xED1C24)
|
||||||
.setAuthor(`#${data.displayID} - ${data.name}`, data.boxImageURL, data.serebiiURL)
|
.setAuthor(`#${data.displayID} - ${data.name}`, data.boxImageURL, data.serebiiURL)
|
||||||
@@ -90,7 +90,7 @@ module.exports = class PokedexCommand extends Command {
|
|||||||
`)
|
`)
|
||||||
.setThumbnail(data.spriteImageURL)
|
.setThumbnail(data.spriteImageURL)
|
||||||
.addField('❯ Class', firstUpperCase(data.class), true)
|
.addField('❯ Class', firstUpperCase(data.class), true)
|
||||||
.addField('❯ Height', `${feet}'${Math.round(data.height) % 12}"`, true)
|
.addField('❯ Height', `${feet}'${Math.floor(data.height) - (feet * 12)}"`, true)
|
||||||
.addField('❯ Weight', `${data.weight} lbs.`, true)
|
.addField('❯ Weight', `${data.weight} lbs.`, true)
|
||||||
.addField('❯ Types', typesShown.map(variety => {
|
.addField('❯ Types', typesShown.map(variety => {
|
||||||
const showParens = variety.name && typesShown.length > 1;
|
const showParens = variety.name && typesShown.length > 1;
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "123.5.3",
|
"version": "123.5.4",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user