trompot 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +8 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -53,8 +53,14 @@ Após iniciar o bot um QR Code será emprimido no terminal, escane-o com seu Wha
53
53
  const client = new Client(new WhatsAppBot());
54
54
  client.connect("./path-to-auth");
55
55
 
56
- client.on("qr", (qr) => {
57
- console.log("Scan QR:", qr);
56
+ // Exibe o QR code no terminal (padrão Baileys)
57
+ client.on("qr", async (qr) => {
58
+ try {
59
+ const QRCode = (await import("qrcode")).default;
60
+ console.log(await QRCode.toString(qr, { type: "terminal" }));
61
+ } catch (err) {
62
+ console.log("QRCode:", qr);
63
+ }
58
64
  });
59
65
  ```
60
66
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trompot",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Chatbot API multi-plataforma em TypeScript. Fork do Rompot.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",