@ryuu-reinzz/haruka-lib 4.0.0-beta.3 → 4.0.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/main/socket.js +14 -13
  2. package/package.json +1 -1
package/main/socket.js CHANGED
@@ -50,7 +50,10 @@ import {
50
50
  import Sticker from './sticker-engine/index.js';
51
51
  const __filename = fileURLToPath(import.meta.url);
52
52
  const __dirname = dirname(__filename);
53
-
53
+ let Button,
54
+ ButtonV2,
55
+ Carousel,
56
+ AIRich;
54
57
  /**
55
58
  * @param {import('baileys').WASocket} socket
56
59
  */
@@ -253,7 +256,7 @@ function addProperty(socket, baileys) {
253
256
  }
254
257
  }
255
258
 
256
- class Button extends BaseBuilder {
259
+ Button = class extends BaseBuilder {
257
260
  #client;
258
261
 
259
262
  constructor(client) {
@@ -576,7 +579,7 @@ function addProperty(socket, baileys) {
576
579
  }
577
580
  }
578
581
 
579
- class ButtonV2 extends BaseBuilder {
582
+ ButtonV2 = class extends BaseBuilder {
580
583
  #client;
581
584
 
582
585
  constructor(client) {
@@ -692,7 +695,7 @@ function addProperty(socket, baileys) {
692
695
  }
693
696
  }
694
697
 
695
- class Carousel extends BaseBuilder {
698
+ Carousel = class extends BaseBuilder {
696
699
  #client;
697
700
 
698
701
  constructor(client) {
@@ -777,7 +780,7 @@ function addProperty(socket, baileys) {
777
780
  }
778
781
  }
779
782
 
780
- class AIRich extends BaseBuilder {
783
+ AIRich = class extends BaseBuilder {
781
784
  #client;
782
785
 
783
786
  constructor(client) {
@@ -1538,10 +1541,6 @@ function addProperty(socket, baileys) {
1538
1541
  };
1539
1542
  }
1540
1543
  }
1541
- global.Button = Button;
1542
- global.ButtonV2 = ButtonV2;
1543
- global.Carousel = Carousel;
1544
- global.AIRich = AIRich;
1545
1544
  Object.assign(socket, {
1546
1545
  sendMessage: async (jid, content, options = {}) => {
1547
1546
  let {
@@ -2444,7 +2443,9 @@ function addProperty(socket, baileys) {
2444
2443
  };
2445
2444
 
2446
2445
  export default addProperty;
2447
- export const Button = global.Button;
2448
- export const ButtonV2 = global.ButtonV2;
2449
- export const Carousel = global.Carousel;
2450
- export const AIRich = global.AIRich;
2446
+ export {
2447
+ Button,
2448
+ ButtonV2,
2449
+ Carousel,
2450
+ AIRich
2451
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryuu-reinzz/haruka-lib",
3
- "version": "4.0.0-beta.3",
3
+ "version": "4.0.0",
4
4
  "description": "Library extra for bot WhatsApp",
5
5
  "main": "main/index.js",
6
6
  "type": "module",