Have the fahrenheit temperature in parenthesis

This commit is contained in:
SileNce5k 2023-12-05 11:02:57 +01:00
parent 563c43724b
commit dcbf3617a3
No known key found for this signature in database
GPG key ID: 961132EB78C8915F

View file

@ -21,7 +21,7 @@ module.exports = {
if(weather.success){
let tempInCelsius = weather.weather.match(tempRegex)[0];
let tempInFahrenheit = Math.round(tempInCelsius * 1.8 + 32);
weather.weather = weather.weather.replace("°C", `°C ${tempInFahrenheit}°F`)
weather.weather = weather.weather.replace("°C", `°C (${tempInFahrenheit})°F`)
}
message.channel.send(weather.weather);
}