Spaces:
Paused
Paused
πππππππ πππππππ β‘
commited on
Update tools-qr.js
Browse files- plugins/tools-qr.js +5 -3
plugins/tools-qr.js
CHANGED
|
@@ -40,14 +40,15 @@ cmd({
|
|
| 40 |
const apiUrl = `https://api.qrserver.com/v1/create-qr-code/?data=${encodeURIComponent(q)}&size=200x200`;
|
| 41 |
const response = await axios.get(apiUrl, { responseType: 'arraybuffer' });
|
| 42 |
const buffer = Buffer.from(response.data, 'binary');
|
| 43 |
-
|
| 44 |
-
await conn.sendMessage(m.chat, { image: buffer }, { quoted: m, caption: 'QR Code' });
|
| 45 |
} catch (error) {
|
| 46 |
console.error(error);
|
| 47 |
reply(`An error occurred: ${error.message}`);
|
| 48 |
}
|
| 49 |
});
|
| 50 |
-
|
|
|
|
| 51 |
// Send the status message with an image
|
| 52 |
await conn.sendMessage(from, {
|
| 53 |
image: { url: buffer }, // Image URL
|
|
@@ -69,4 +70,5 @@ cmd({
|
|
| 69 |
reply(`An error occurred: ${e.message}`);
|
| 70 |
}
|
| 71 |
});
|
|
|
|
| 72 |
|
|
|
|
| 40 |
const apiUrl = `https://api.qrserver.com/v1/create-qr-code/?data=${encodeURIComponent(q)}&size=200x200`;
|
| 41 |
const response = await axios.get(apiUrl, { responseType: 'arraybuffer' });
|
| 42 |
const buffer = Buffer.from(response.data, 'binary');
|
| 43 |
+
|
| 44 |
+
await conn.sendMessage(m.chat, { image: buffer }, { quoted: m, caption: 'QR Code By Subzero' });
|
| 45 |
} catch (error) {
|
| 46 |
console.error(error);
|
| 47 |
reply(`An error occurred: ${error.message}`);
|
| 48 |
}
|
| 49 |
});
|
| 50 |
+
|
| 51 |
+
/*
|
| 52 |
// Send the status message with an image
|
| 53 |
await conn.sendMessage(from, {
|
| 54 |
image: { url: buffer }, // Image URL
|
|
|
|
| 70 |
reply(`An error occurred: ${e.message}`);
|
| 71 |
}
|
| 72 |
});
|
| 73 |
+
*/
|
| 74 |
|