@builderbot/provider-web-whatsapp 1.0.21-alpha.0 → 1.0.23-alpha.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.
package/dist/index.cjs CHANGED
@@ -31923,16 +31923,17 @@ class WebWhatsappProvider extends bot.ProviderClass {
31923
31923
  this.busEvents = () => [
31924
31924
  {
31925
31925
  event: 'auth_failure',
31926
- func: (payload) => this.emit('error', payload),
31926
+ func: (payload) => this.emit('auth_failure', payload),
31927
31927
  },
31928
31928
  {
31929
31929
  event: 'qr',
31930
31930
  func: async (qr) => {
31931
31931
  this.emit('require_action', {
31932
+ title: '⚡⚡ ACTION REQUIRED ⚡⚡',
31932
31933
  instructions: [
31933
- `Debes escanear el QR Code para iniciar ${this.globalVendorArgs.name}.qr.png`,
31934
- `Recuerda que el QR se actualiza cada minuto `,
31935
- `Necesitas ayuda: https://link.codigoencasa.com/DISCORD`,
31934
+ `You must scan the QR Code`,
31935
+ `Remember that the QR code updates every minute`,
31936
+ `Need help: https://link.codigoencasa.com/DISCORD`,
31936
31937
  ],
31937
31938
  });
31938
31939
  await wwebGenerateImage(qr, `${this.globalVendorArgs.name}.qr.png`);
@@ -31983,10 +31984,13 @@ class WebWhatsappProvider extends bot.ProviderClass {
31983
31984
  * @returns
31984
31985
  */
31985
31986
  this.sendButtons = async (number, message, buttons = []) => {
31986
- this.emit('notice', [
31987
- `[NOTA]: Actualmente enviar botones no esta disponible con este proveedor`,
31988
- `[NOTA]: esta funcion esta disponible con Meta o Twilio`,
31989
- ].join('\n'));
31987
+ this.emit('notice', {
31988
+ title: 'DEPRECATED',
31989
+ instructions: [
31990
+ `Currently sending buttons is not available with this provider`,
31991
+ `this function is available with Meta or Twilio`,
31992
+ ],
31993
+ });
31990
31994
  const buttonMessage = new whatsappWeb_js.Buttons(message, buttons, '', '');
31991
31995
  return this.vendor.sendMessage(number, buttonMessage);
31992
31996
  };
@@ -32137,14 +32141,14 @@ class WebWhatsappProvider extends bot.ProviderClass {
32137
32141
  for (const { event, func } of listEvents) {
32138
32142
  this.vendor.on(event, func);
32139
32143
  }
32140
- this.vendor.emit('preinit');
32141
32144
  this.vendor.initialize().catch((e) => {
32142
32145
  logger.log(e);
32143
32146
  this.emit('require_action', {
32147
+ title: '❌ ERROR ❌',
32144
32148
  instructions: [
32145
- `(Opcion 1): Debes eliminar la carpeta .wwebjs_auth y reiniciar nuevamente el bot. `,
32146
- `(Opcion 2): Ejecutar este comando "npm install whatsapp-web.js@latest" `,
32147
- `(Opcion 3): Ir FORO de discord https://link.codigoencasa.com/DISCORD `,
32149
+ `(Option 1): You must delete the .wwebjs_auth folder and restart the bot.`,
32150
+ `(Option 2): Run this command "npm install whatsapp-web.js@latest".`,
32151
+ `(Option 3): Visit the Discord forum at https://link.codigoencasa.com/DISCORD.`,
32148
32152
  ],
32149
32153
  });
32150
32154
  });
package/dist/index.d.ts CHANGED
@@ -32,20 +32,10 @@ declare class WebWhatsappProvider extends ProviderClass {
32
32
  * para tener un standar de eventos
33
33
  * @returns
34
34
  */
35
- busEvents: () => ({
35
+ busEvents: () => {
36
36
  event: string;
37
- func: (qr: string) => Promise<void>;
38
- } | {
39
- event: string;
40
- func: (payload: WAWebJS.Message & {
41
- _data: {
42
- lng?: string;
43
- lat?: string;
44
- type?: string;
45
- };
46
- name: string;
47
- }) => void;
48
- })[];
37
+ func: (payload: any) => void;
38
+ }[];
49
39
  /**
50
40
  * @deprecated Buttons are not available in this provider, please use sendButtons instead
51
41
  * @private
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAS,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAoB,uBAAuB,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAInG,OAAO,OAAO,EAAE,EAAE,MAAM,EAAoC,MAAM,iBAAiB,CAAA;AAEnF,OAAO,EAAE,qBAAqB,EAAE,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M,8BAYhE;IAED;;;;;OAKG;IAEH,OAAO,4HAAgC;IACvC;;;;;;OAMG;IACH,WAAW,WAAkB,MAAM,WAAW,MAAM,YAAY,WAAW,KAAG,QAAQ,GAAG,CAAC,CAMzF;CACJ;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builderbot/provider-web-whatsapp",
3
- "version": "1.0.21-alpha.0",
3
+ "version": "1.0.23-alpha.0",
4
4
  "description": "Now I’m the model of a modern major general / The venerated Virginian veteran whose men are all / Lining up, to put me up on a pedestal / Writin’ letters to relatives / Embellishin’ my elegance and eloquence / But the elephant is in the room / The truth is in ya face when ya hear the British cannons go / BOOM",
5
5
  "keywords": [],
6
6
  "author": "Leifer Mendez <leifer33@gmail.com>",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "homepage": "https://github.com/codigoencasa/bot-whatsapp#readme",
31
31
  "devDependencies": {
32
- "@builderbot/bot": "^1.0.21-alpha.0",
32
+ "@builderbot/bot": "^1.0.23-alpha.0",
33
33
  "@rollup/plugin-commonjs": "^25.0.7",
34
34
  "@rollup/plugin-json": "^6.1.0",
35
35
  "@rollup/plugin-node-resolve": "^15.2.3",
@@ -53,5 +53,5 @@
53
53
  "polka": "^0.5.2",
54
54
  "whatsapp-web.js": "^1.23.0"
55
55
  },
56
- "gitHead": "ab9a11dd0d58d212309d9fe4293d32aaf9f4db70"
56
+ "gitHead": "eda828c77a06b4e0215deb54d3000469c0e2ecb4"
57
57
  }