Now with weather
This commit is contained in:
		@@ -4,7 +4,7 @@ import datetime
 | 
			
		||||
 | 
			
		||||
def show_weather(location):
 | 
			
		||||
    url = "https://api.openweathermap.org/data/2.5/onecall?"
 | 
			
		||||
    data = {"lat" : location[0], "lon" : location[1], "exclude" : "minutely,hourly", "appid" : api.keys.weather_api, "units" : "metric"}
 | 
			
		||||
    data = {"lat" : location[0], "lon" : location[1], "exclude" : "minutely,hourly", "appid" : bot.api.keys.weather_api, "units" : "metric"}
 | 
			
		||||
    today = datetime.datetime.today().weekday()
 | 
			
		||||
    days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -155,7 +155,6 @@ class ChatBot():
 | 
			
		||||
            city = locations[params[0].lower().replace("ü","u")]
 | 
			
		||||
        else:
 | 
			
		||||
            return "Couldn't find city, it might be added later though."
 | 
			
		||||
            return
 | 
			
		||||
 | 
			
		||||
        message = weather.show_weather(city)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user