linx: deal with no URL provided
This commit is contained in:
@@ -12,11 +12,13 @@ def linx(phenny, input):
|
|||||||
""".linx <url> - Upload a URL to linx.li."""
|
""".linx <url> - Upload a URL to linx.li."""
|
||||||
|
|
||||||
url = input.group(2)
|
url = input.group(2)
|
||||||
|
if not url:
|
||||||
|
phenny.reply("No URL provided. CAN I HAS?")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
req = web.post("http://linx.li/vtluug", {'url': url})
|
req = web.post("http://linx.li/vtluug", {'url': url})
|
||||||
except (HTTPError, IOError):
|
except (HTTPError, IOError):
|
||||||
phenny.say("THE INTERNET IS FUCKING BROKEN. Please try again later.")
|
phenny.reply("THE INTERNET IS FUCKING BROKEN. Please try again later.")
|
||||||
return
|
return
|
||||||
|
|
||||||
data = json.loads(req)
|
data = json.loads(req)
|
||||||
|
|||||||
Reference in New Issue
Block a user