aboutsummaryrefslogtreecommitdiff
path: root/modules/bitly.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-07-15 15:15:52 +0100
committerGravatar jesopo2018-07-15 15:15:52 +0100
commit68298bbccf715fb4d8c82e45a74c309a74d0c77e (patch)
treea6332b25e75f7093ae963f9d74db747e86ea2fd5 /modules/bitly.py
parentMove quit quotes to it's own module (diff)
signature
Added EventHook.call_for_result to get a result or default from an event
Diffstat (limited to 'modules/bitly.py')
-rw-r--r--modules/bitly.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/bitly.py b/modules/bitly.py
index ac7835a1..f31ca347 100644
--- a/modules/bitly.py
+++ b/modules/bitly.py
@@ -25,8 +25,8 @@ class Module(object):
return data["data"]["url"]
def shorten(self, event):
- link = self.bot.events.on("get").on("shortlink").call(
- url=event["args"])[0]
+ link = self.bot.events.on("get").on("shortlink"
+ ).call_for_result(url=event["args"])
if link:
event["stdout"].write("Short URL: %s" % link)
else: