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/disabled_stuff/qrcode.py

19 lines
411 B
Python
Raw Normal View History

2013-08-05 11:32:53 +02:00
# Plugin by https://github.com/Mu5tank05
from util import hook, web, http
@hook.command('qr')
@hook.command
2013-09-04 12:30:04 +02:00
def qrcode(inp):
"""qrcode [link] returns a link for a QR code."""
2013-08-05 11:32:53 +02:00
args = {
2014-02-14 04:30:38 +01:00
"cht": "qr", # chart type (QR)
2013-09-04 12:30:04 +02:00
"chs": "200x200", # dimensions
2014-02-14 04:30:38 +01:00
"chl": inp # data
}
link = http.prepare_url("http://chart.googleapis.com/chart", args)
2013-08-05 11:32:53 +02:00
2013-09-04 12:30:04 +02:00
return web.try_isgd(link)