Hi, whenever !weather is typed in chat i want the output to be translated from english to turkish. Is there a code list so i can just translate the english part?
Emily
December 4, 2023, 9:54pm
2
Hey @oldbutdolphin !
Check out both of these posts, they should help you, but let us know if you have any issue:
Hey @Xepo !
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', '目前濕度'))
Hey @leonxnez and @snattanzi !
It seems to me your issue is mostly the lack of space to write the code, right?
To answer your question, yes, you can use Pastebin to expand your code, here’s how to do it:
$(eval w='$(weather $(query))'; $(urlfetch json https://pastebin.com/raw/XXXXXXXXX))
And in your paste:
w.replace().replace().replace().[...].replace()
Since you’ll have more room to write the code, I recommend using regex in the replace to match expressions regardless of the capitalization…
system
Closed
December 18, 2023, 9:55pm
3
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.