Team-Gigabyte / quotobot

Use const declarations for variables that are never reassigned JS-0242
Anti-pattern
Minor
5 months ago3 years old
'displayCity' is never reassigned. Use 'const' instead
382                        let wind = jd.wind.speed + " " + windUnits;
383                        let { username: author } = message.author;
384                        let { icon, description: cloudness } = jd.weather[0];
385                        let { id, name: displayCity, dt: timestamp } = jd;386                        let { country } = jd.sys;
387                        country += cFlags.get(country).emoji ? " " + cFlags.get(country).emoji : "";
388                        message.reply(embed.currWeather(currentTemp, maxTemp, minTemp, pressure, humidity, wind, cloudness, icon, author, displayCity, country, units, id, timestamp));
'timestamp' is never reassigned. Use 'const' instead
382                        let wind = jd.wind.speed + " " + windUnits;
383                        let { username: author } = message.author;
384                        let { icon, description: cloudness } = jd.weather[0];
385                        let { id, name: displayCity, dt: timestamp } = jd;386                        let { country } = jd.sys;
387                        country += cFlags.get(country).emoji ? " " + cFlags.get(country).emoji : "";
388                        message.reply(embed.currWeather(currentTemp, maxTemp, minTemp, pressure, humidity, wind, cloudness, icon, author, displayCity, country, units, id, timestamp));
'id' is never reassigned. Use 'const' instead
382                        let wind = jd.wind.speed + " " + windUnits;
383                        let { username: author } = message.author;
384                        let { icon, description: cloudness } = jd.weather[0];
385                        let { id, name: displayCity, dt: timestamp } = jd;386                        let { country } = jd.sys;
387                        country += cFlags.get(country).emoji ? " " + cFlags.get(country).emoji : "";
388                        message.reply(embed.currWeather(currentTemp, maxTemp, minTemp, pressure, humidity, wind, cloudness, icon, author, displayCity, country, units, id, timestamp));
'temp_max' is never reassigned. Use 'const' instead
375                            message.reply(embed.error("There was an error getting the weather.", `${jd.cod || apiData.status}: ${jd.message || apiData.statusText}`));
376                            return;
377                        }
378                        let { temp, temp_max, temp_min, humidity, pressure } = jd.main;379                        let currentTemp = Math.round(temp);
380                        let maxTemp = Math.round(temp_max);
381                        let minTemp = Math.round(temp_min);
'temp' is never reassigned. Use 'const' instead
375                            message.reply(embed.error("There was an error getting the weather.", `${jd.cod || apiData.status}: ${jd.message || apiData.statusText}`));
376                            return;
377                        }
378                        let { temp, temp_max, temp_min, humidity, pressure } = jd.main;379                        let currentTemp = Math.round(temp);
380                        let maxTemp = Math.round(temp_max);
381                        let minTemp = Math.round(temp_min);