Create QR code plugin
This commit is contained in:
parent
4d74493610
commit
0160d86a64
1 changed files with 15 additions and 0 deletions
15
plugins/qr.py
Normal file
15
plugins/qr.py
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# 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.quote_plus(inp)
|
||||||
|
|
||||||
|
try:
|
||||||
|
return web.isgd(link)
|
||||||
|
except (web.ShortenError, http.HTTPError):
|
||||||
|
return link
|
Reference in a new issue