diff --git a/bot/main.py b/bot/main.py index 49fad35..36a9b30 100644 --- a/bot/main.py +++ b/bot/main.py @@ -150,8 +150,9 @@ class ChatBot(): 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]} - if args[0].lower().replace("ü","u") in locations: - city = locations[args[0].lower().replace("ü","u")] + loc = args[0] + if loc.lower().replace("ü","u") in locations: + city = locations[loc.lower().replace("ü","u")] else: return "Couldn't find city, it might be added later though." diff --git a/clock_wrapper.py b/clock_wrapper.py index dd51ed2..187f93c 100644 --- a/clock_wrapper.py +++ b/clock_wrapper.py @@ -45,7 +45,7 @@ class ModuleWrapper(): d = datetime.datetime.now() - prev_weather_time if d.total_seconds() >= 3*3600: 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 = l1.replace("Today: ","") l1 = l1.replace (":","")