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