aboutsummaryrefslogtreecommitdiff
path: root/modules/bitly.py
diff options
context:
space:
mode:
authorGravatar dngfx2018-09-09 13:12:06 +0100
committerGravatar dongfix2018-09-09 13:12:06 +0100
commit7aecd2b4ca4a2dc05146c49aaa44fffdf16fa5bd (patch)
tree704834d6f16982d408007d1ca895c24d50cc920a /modules/bitly.py
parentBetter indentation in commands.py (diff)
signature
WOOP WOOP THAT'S THE SOUND OF LINKS FOR TWEETS
Diffstat (limited to 'modules/bitly.py')
-rw-r--r--modules/bitly.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/bitly.py b/modules/bitly.py
index afcc1522..cd69bb4e 100644
--- a/modules/bitly.py
+++ b/modules/bitly.py
@@ -16,7 +16,8 @@ class Module(object):
usage="<url>")
def shortlink(self, event):
- url = event["url"]
+ url = event if type(event) is str else event["url"]
+
if not re.match(REGEX_URL, url):
url = "http://%s" % url
data = Utils.get_url(URL_BITLYSHORTEN, get_params={