diff options
| author | 2018-10-03 13:22:37 +0100 | |
|---|---|---|
| committer | 2018-10-03 13:22:37 +0100 | |
| commit | 69d58eede2e9bf83aa1ed1d8fcf956efde494726 (patch) | |
| tree | 11aa30f2a357f3be23ad97315dae3df051455cbe /modules/wolframalpha.py | |
| parent | Add a way to not add a user automatically in IRCServer.get_user (diff) | |
| signature | ||
Move src/Utils.py in to src/utils/, splitting functionality out in to modules of
related functionality
Diffstat (limited to 'modules/wolframalpha.py')
| -rw-r--r-- | modules/wolframalpha.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/wolframalpha.py b/modules/wolframalpha.py index 7d348df5..153b51e8 100644 --- a/modules/wolframalpha.py +++ b/modules/wolframalpha.py @@ -1,19 +1,20 @@ #--require-config wolframalpha-api-key import json -from src import ModuleManager, Utils +from src import ModuleManager, utils URL_WA = "https://api.wolframalpha.com/v1/result" class Module(ModuleManager.BaseModule): _name = "Wolfram|Alpha" - @Utils.hook("received.command.wolframalpha|wa", min_args=1) + @utils.hook("received.command.wolframalpha|wa", min_args=1) def wa(self, event): """ :help: Evauate a given string on Wolfram|Alpha :usage: <query> """ - code, result = Utils.get_url(URL_WA, get_params={"i": event["args"], + code, result = utils.http.get_url(URL_WA, + get_params={"i": event["args"], "appid": self.bot.config["wolframalpha-api-key"], "reinterpret": "true", "units": "metric"}, code=True) |
