From 69d58eede2e9bf83aa1ed1d8fcf956efde494726 Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 3 Oct 2018 13:22:37 +0100 Subject: Move src/Utils.py in to src/utils/, splitting functionality out in to modules of related functionality --- modules/weather.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/weather.py') diff --git a/modules/weather.py b/modules/weather.py index a1c14f27..78fe0b7f 100644 --- a/modules/weather.py +++ b/modules/weather.py @@ -1,18 +1,18 @@ #--require-config openweathermap-api-key -from src import ModuleManager, Utils +from src import ModuleManager, utils URL_WEATHER = "http://api.openweathermap.org/data/2.5/weather" class Module(ModuleManager.BaseModule): - @Utils.hook("received.command.weather", min_args=1, usage="") + @utils.hook("received.command.weather", min_args=1, usage="") def weather(self, event): """ :help: Get current weather data for a provided location :usage: """ api_key = self.bot.config["openweathermap-api-key"] - page = Utils.get_url(URL_WEATHER, get_params={ + page = utils.http.get_url(URL_WEATHER, get_params={ "q": event["args"], "units": "metric", "APPID": api_key}, json=True) -- cgit v1.3.1-10-gc9f91