Team-Gigabyte / quotobot

Useless template literal found JS-R1004
Anti-pattern
Minor
5 months ago5 months old
Template string can be replaced with regular string literal
127            .setURL(`https://openweathermap.org/city/${id}`)
128            .addField(`🌡 Max Temp`, `${maxTemp}°${units == "metric" ? "C" : "F"}`, true)
129            .addField(`🌡 Min Temp`, `${minTemp}°${units == "metric" ? "C" : "F"}`, true)
130            .addField(`💧 Humidity`, `${humidity}%`, true)131            .addField(`💨 Wind Speed`, wind, true)
132            .addField(`📊 Pressure`, `${pressure} hpa`, true)
133            .addField(`⛅️ Cloudiness`, cloudiness, true)
Template string can be replaced with regular string literal
126            .setTitle(`It's ${temp}°${units == "metric" ? "C" : "F"} in ${cityName}, ${country}`)
127            .setURL(`https://openweathermap.org/city/${id}`)
128            .addField(`🌡 Max Temp`, `${maxTemp}°${units == "metric" ? "C" : "F"}`, true)
129            .addField(`🌡 Min Temp`, `${minTemp}°${units == "metric" ? "C" : "F"}`, true)130            .addField(`💧 Humidity`, `${humidity}%`, true)
131            .addField(`💨 Wind Speed`, wind, true)
132            .addField(`📊 Pressure`, `${pressure} hpa`, true)
Template string can be replaced with regular string literal
125            .setAuthor(`Hello, ${author}`)
126            .setTitle(`It's ${temp}°${units == "metric" ? "C" : "F"} in ${cityName}, ${country}`)
127            .setURL(`https://openweathermap.org/city/${id}`)
128            .addField(`🌡 Max Temp`, `${maxTemp}°${units == "metric" ? "C" : "F"}`, true)129            .addField(`🌡 Min Temp`, `${minTemp}°${units == "metric" ? "C" : "F"}`, true)
130            .addField(`💧 Humidity`, `${humidity}%`, true)
131            .addField(`💨 Wind Speed`, wind, true)
Template string can be replaced with regular string literal
130            .addField(`💧 Humidity`, `${humidity}%`, true)
131            .addField(`💨 Wind Speed`, wind, true)
132            .addField(`📊 Pressure`, `${pressure} hpa`, true)
133            .addField(`⛅️ Cloudiness`, cloudiness, true)134            .setFooter(`This is in ${units} units — you can try ${prefix}weather ${units == "metric" ? "imperial" : "metric"} ${cityName} • Data from OpenWeatherMap`, icons.bulb)
135            .setThumbnail(`https://openweathermap.org/img/wn/${icon}@2x.png`)
136            .setTimestamp(new Date(timestamp * 1000)),
Template string can be replaced with regular string literal
129            .addField(`🌡 Min Temp`, `${minTemp}°${units == "metric" ? "C" : "F"}`, true)
130            .addField(`💧 Humidity`, `${humidity}%`, true)
131            .addField(`💨 Wind Speed`, wind, true)
132            .addField(`📊 Pressure`, `${pressure} hpa`, true)133            .addField(`⛅️ Cloudiness`, cloudiness, true)
134            .setFooter(`This is in ${units} units — you can try ${prefix}weather ${units == "metric" ? "imperial" : "metric"} ${cityName} • Data from OpenWeatherMap`, icons.bulb)
135            .setThumbnail(`https://openweathermap.org/img/wn/${icon}@2x.png`)