This repository has been archived on 2023-04-13. You can view files and clone it, but cannot push or open issues or pull requests.
2012-10-13 01:10:02 +02:00
|
|
|
from util import hook, http, web
|
2011-11-20 10:23:31 +01:00
|
|
|
|
2012-03-23 01:32:48 +01:00
|
|
|
|
2011-11-20 10:23:31 +01:00
|
|
|
@hook.command
|
2012-08-28 06:38:40 +02:00
|
|
|
def shorten(inp):
|
2013-09-04 12:30:04 +02:00
|
|
|
"""shorten <url> - Makes an is.gd shortlink to the url provided."""
|
2012-04-21 05:57:05 +02:00
|
|
|
|
2012-04-21 05:55:52 +02:00
|
|
|
try:
|
2012-10-13 01:10:02 +02:00
|
|
|
return web.isgd(inp)
|
|
|
|
except (web.ShortenError, http.HTTPError) as error:
|
|
|
|
return error
|