diff options
Diffstat (limited to 'modules/weather.py')
| -rw-r--r-- | modules/weather.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/weather.py b/modules/weather.py index e79d1ad8..f16b62b7 100644 --- a/modules/weather.py +++ b/modules/weather.py @@ -7,11 +7,12 @@ URL_WEATHER = "http://api.openweathermap.org/data/2.5/weather" class Module(object): def __init__(self, bot, events, exports): self.bot = bot - events.on("received.command.weather").hook(self.weather, min_args=1, - help="Get current weather data for a provided location", - usage="<location>") + @Utils.hook("received.command.weather", min_args=1, usage="<location>") def weather(self, event): + """ + Get current weather data for a provided location + """ api_key = self.bot.config["openweathermap-api-key"] page = Utils.get_url(URL_WEATHER, get_params={ "q": event["args"], "units": "metric", |
