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)
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)
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)
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)),
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`)
Template literals are useful when you need:
Strings that have unescaped double quotes and single quotes.
Strings that need line breaks in them.
If neither of these three conditions is met, you can replace the template expression with a regular string literal.
const dialogue = `"Journey before destination", said Dalinar.`
const dialogue2 = `What is a 'Kwisatz Haderach'?`
const dialogue = '"Journey before destination", said Dalinar.'
const dialogue2 = "What is a 'Kwisatz Haderach'?"
const dialogue3 = `"${getLine()}", said ${getChararcter()}`