fixing up my mistakes
This commit is contained in:
		| @@ -150,8 +150,9 @@ class ChatBot(): | |||||||
|             return "Invalid Syntax, please give one parameter, the location" |             return "Invalid Syntax, please give one parameter, the location" | ||||||
|  |  | ||||||
|         locations = {"freiburg": [47.9990, 7.8421], "zurich": [47.3769, 8.5417], "mulhouse": [47.7508, 7.3359]} |         locations = {"freiburg": [47.9990, 7.8421], "zurich": [47.3769, 8.5417], "mulhouse": [47.7508, 7.3359]} | ||||||
|         if args[0].lower().replace("ü","u") in locations: |         loc = args[0] | ||||||
|             city = locations[args[0].lower().replace("ü","u")] |         if loc.lower().replace("ü","u") in locations: | ||||||
|  |             city = locations[loc.lower().replace("ü","u")] | ||||||
|         else: |         else: | ||||||
|             return "Couldn't find city, it might be added later though." |             return "Couldn't find city, it might be added later though." | ||||||
|  |  | ||||||
|   | |||||||
| @@ -45,7 +45,7 @@ class ModuleWrapper(): | |||||||
|                 d = datetime.datetime.now() - prev_weather_time |                 d = datetime.datetime.now() - prev_weather_time | ||||||
|                 if d.total_seconds() >= 3*3600: |                 if d.total_seconds() >= 3*3600: | ||||||
|                     prev_weather_time = datetime.datetime.now() |                     prev_weather_time = datetime.datetime.now() | ||||||
|                     weather = self.bot.bot_show_weather(["zurich"]) |                     weather = self.bot.bot_show_weather("zurich") | ||||||
|                     l1 = weather[:weather.find("\n")] |                     l1 = weather[:weather.find("\n")] | ||||||
|                     l1 = l1.replace("<b>Today:</b> ","") |                     l1 = l1.replace("<b>Today:</b> ","") | ||||||
|                     l1 = l1.replace (":","") |                     l1 = l1.replace (":","") | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Remy Moll
					Remy Moll