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/thesaurus.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/thesaurus.py') diff --git a/modules/thesaurus.py b/modules/thesaurus.py index 8d5d540e..9452ab26 100644 --- a/modules/thesaurus.py +++ b/modules/thesaurus.py @@ -1,18 +1,18 @@ #--require-config bighugethesaurus-api-key -from src import ModuleManager, Utils +from src import ModuleManager, utils URL_THESAURUS = "http://words.bighugelabs.com/api/2/%s/%s/json" class Module(ModuleManager.BaseModule): - @Utils.hook("received.command.synonym|antonym", min_args=1) + @utils.hook("received.command.synonym|antonym", min_args=1) def thesaurus(self, event): """ :help: Get synonyms/antonyms for a provided phrase :usage: [type] """ phrase = event["args_split"][0] - page = Utils.get_url(URL_THESAURUS % (self.bot.config[ + page = utils.http.get_url(URL_THESAURUS % (self.bot.config[ "bighugethesaurus-api-key"], phrase), json=True) syn_ant = event["command"][:3] if page: -- cgit v1.3.1-10-gc9f91