From 97152e238f387ce48ed59fceccf08e5d1775cb19 Mon Sep 17 00:00:00 2001 From: derpystuff <3515180-derpystuff@users.noreply.gitlab.com> Date: Sun, 29 Oct 2023 14:05:44 +0100 Subject: [PATCH] floor humidity --- commands/message/utils/weather.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/message/utils/weather.js b/commands/message/utils/weather.js index cc903c7..a170ef1 100644 --- a/commands/message/utils/weather.js +++ b/commands/message/utils/weather.js @@ -29,7 +29,7 @@ module.exports = { let description = `### ${weatherIcon(data.result.current.condition.id.toLowerCase())} ​ ​ ​ ​ ${Math.floor(data.result.current.temperature.current)}°C • ${data.result.current.condition.label}\n${data.result.location}\n\n${pill("Feels like")} ${smallPill(Math.floor(data.result.current.temperature.feels_like) + "°C")} ​ ​ ​ ​ ${pill("Wind")} ${smallPill(data.result.current.wind.speed + " km/h")}` let secondaryPills = []; - if(data.result.current.humidity > 0) secondaryPills.push(`${pill("Humidity")} ${smallPill((data.result.current.humidity * 100) + "%")}`) + if(data.result.current.humidity > 0) secondaryPills.push(`${pill("Humidity")} ${smallPill(Math.floor(data.result.current.humidity * 100) + "%")}`) if(data.result.current.uvindex > 0) secondaryPills.push(`${pill("UV Index")} ${smallPill(data.result.current.uvindex)}`) if(secondaryPills.length >= 1) description += '\n' + secondaryPills.join(` ​ ​ ​ ​ `)