mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-03 11:04:51 +00:00
Add reply in qr
This commit is contained in:
parent
8918bf19fd
commit
3d8ccd7f8f
1 changed files with 2 additions and 2 deletions
|
|
@ -69,9 +69,9 @@ async def readqr(c, m):
|
||||||
|
|
||||||
@app.on_message(filters.command("createqr", COMMAND_HANDLER))
|
@app.on_message(filters.command("createqr", COMMAND_HANDLER))
|
||||||
async def makeqr(c, m):
|
async def makeqr(c, m):
|
||||||
if len(m.command) == 1 and not m.reply_to_message.text:
|
if len(m.command) == 1 or (not m.reply_to_message and not m.reply_to_message.text):
|
||||||
return await m.reply("Please add text after command to convert text -> QR Code.")
|
return await m.reply("Please add text after command to convert text -> QR Code.")
|
||||||
teks = m.text.split(None, 1)[1] or m.reply_to_message.text
|
teks = m.text.split(None, 1)[1] if m.reply_to_message else m.reply_to_message.text
|
||||||
url = f"https://api.qrserver.com/v1/create-qr-code/?data={quote(teks)}&size=300x300"
|
url = f"https://api.qrserver.com/v1/create-qr-code/?data={quote(teks)}&size=300x300"
|
||||||
await m.reply_photo(url, caption=f"<b>QR Code Maker by @{c.me.username}</b>", quote=True)
|
await m.reply_photo(url, caption=f"<b>QR Code Maker by @{c.me.username}</b>", quote=True)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue