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.
CloudBot/plugins/qr.py
2013-08-05 20:30:58 +10:00

16 lines
359 B
Python

# Plugin by https://github.com/Mu5tank05
from util import hook, web, http
@hook.command('qr')
@hook.command
def qrcode(inp, bot=None):
"qrcode [link] returns a link for a QR code."
link = "http://blny.tk/qr.php?q=%s" % http.get_url(inp)
try:
return web.try_isgd(link)
except (web.ShortenError, http.HTTPError):
return link