aboutsummaryrefslogtreecommitdiff
path: root/modules/google.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-30 11:43:34 +0100
committerGravatar jesopo2018-09-30 11:43:34 +0100
commit30641ce312ff5ce768df5c83e54083f959401f39 (patch)
tree923ba832e52cf6749650ca9c4791adb517fb360f /modules/google.py
parentFix piece of modules/define.py._get_definition( that was accepting a word or an (diff)
We don't need to explicitly pass "buffer" through on command events
Diffstat (limited to 'modules/google.py')
-rw-r--r--modules/google.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/google.py b/modules/google.py
index fb487db1..f6d8469c 100644
--- a/modules/google.py
+++ b/modules/google.py
@@ -13,7 +13,7 @@ class Module(ModuleManager.BaseModule):
"""
Get first Google result for a given search term
"""
- phrase = event["args"] or event["buffer"].get()
+ phrase = event["args"] or event["target"].buffer.get()
if phrase:
page = Utils.get_url(URL_GOOGLESEARCH, get_params={
"q": phrase, "key": self.bot.config[
@@ -36,7 +36,7 @@ class Module(ModuleManager.BaseModule):
"""
Get suggested phrases from Google
"""
- phrase = event["args"] or event["buffer"].get()
+ phrase = event["args"] or event["target"].buffer.get()
if phrase:
page = Utils.get_url(URL_GOOGLESUGGEST, get_params={
"output": "json", "client": "hp", "q": phrase})