Hi , I live in Taiwan . I want to make a weather request command that the result of the answer is in Chinese .But when I in put command “!weather Taipei” , Nightbot response “Invalid location specified”.I can’t find the error .
$(weather $(query).replace(“Weather for” , “目前”).replace(“Conditions are” , “天氣狀況是”).replace(“with a temperature of” , “溫度是”).replace(“The wind is blowing from the” , “風向是”).replace(“at” , “風速是”).replace(“and the current humidity is” , “目前濕度”))
You forgot a couple things: the $(eval) at the start, and to close the $(weather) after $(query), you also used wrong quotation marks: “” instead of either of these: '`".
$(eval '$(weather $(query))'.replace('Weather for', '目前').replace('Conditions are', '天氣狀況是').replace('with a temperature of', '溫度是').replace('The wind is blowing from the', '風向是').replace('at', '風速是').replace('and the current humidity is', '目前濕度'))