fixing up my mistakes
This commit is contained in:
parent
09272ada64
commit
213834bdd7
@ -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."
|
||||
|
||||
|
@ -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("<b>Today:</b> ","")
|
||||
l1 = l1.replace (":","")
|
||||
|
Loading…
x
Reference in New Issue
Block a user