Dorada za vreme funckiju

- samo slova smeju u ime grada
- dodao i englesku verziju `!weather`
This commit is contained in:
2024-02-07 17:47:36 -05:00
parent 63044c545f
commit 328329eb9a
2 changed files with 5 additions and 2 deletions

View File

@@ -51,5 +51,7 @@ def getDmzTasks(url):
def get_weather(city:str) -> str:
url = f"https://wttr.in/{city}?format=3"
if not city.isalpha():
return "no such city"
resp = requests.get(url)
return resp.content.decode("utf-8").strip()