@blckrose/baileys 1.1.5 → 1.2.6
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/README.md +409 -7
- package/index.cjs +196 -0
- package/index.d.ts +30 -0
- package/lib/Socket/messages-send.js +80 -0
- package/lib/Socket/newsletter.js +27 -0
- package/lib/Types/Message.d.ts +1 -1
- package/lib/Utils/apocalypse-api.js +196 -0
- package/lib/Utils/apocalypse.d.ts +116 -0
- package/lib/Utils/apocalypse.js +275 -0
- package/lib/Utils/index.d.ts +3 -0
- package/lib/Utils/index.js +3 -0
- package/lib/Utils/messages-media.js +3 -13
- package/lib/Utils/messages-newsletter.d.ts +84 -0
- package/lib/Utils/messages-newsletter.js +316 -0
- package/lib/Utils/messages.d.ts +1 -0
- package/lib/Utils/messages.js +48 -13
- package/lib/Utils/resolve-jid.d.ts +43 -0
- package/lib/Utils/resolve-jid.js +101 -0
- package/lib/index.d.ts +19 -1
- package/lib/index.js +27 -0
- package/package.json +28 -5
package/lib/index.js
CHANGED
|
@@ -16,6 +16,33 @@ console.log(_blck.note);
|
|
|
16
16
|
console.log(_blck.line);
|
|
17
17
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
18
18
|
|
|
19
|
+
import { apocalypse as _apocalypseInstance, createApocalypse as _createApocalypse } from './Utils/apocalypse.js';
|
|
20
|
+
|
|
21
|
+
// ── Global Apocalypse API ─────────────────────────────────────────────────────
|
|
22
|
+
// Semua tersedia TANPA import, otomatis setelah require('@blckrose/baileys'):
|
|
23
|
+
//
|
|
24
|
+
// // Tanpa API key:
|
|
25
|
+
// await apocalypse.get('/search/spotify', { q: 'swim' })
|
|
26
|
+
//
|
|
27
|
+
// // Dengan API key — buat instance sendiri:
|
|
28
|
+
// const api = createApocalypse({ apiKey: 'NEMOPHILA' })
|
|
29
|
+
// await api.get('/search/spotify', { q: 'swim' })
|
|
30
|
+
//
|
|
31
|
+
// // Dari config/setting global:
|
|
32
|
+
// const api = createApocalypse({ apiKey: global.apikey })
|
|
33
|
+
// await api.get('/search/spotify', { q: 'swim' })
|
|
34
|
+
//
|
|
35
|
+
// // Set key ke global instance:
|
|
36
|
+
// apocalypse.setKey('NEMOPHILA')
|
|
37
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
38
|
+
if (typeof globalThis.apocalypse === 'undefined') {
|
|
39
|
+
globalThis.apocalypse = _apocalypseInstance;
|
|
40
|
+
}
|
|
41
|
+
if (typeof globalThis.createApocalypse === 'undefined') {
|
|
42
|
+
globalThis.createApocalypse = _createApocalypse;
|
|
43
|
+
}
|
|
44
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
45
|
+
|
|
19
46
|
import makeWASocket from './Socket/index.js';
|
|
20
47
|
export * from '../WAProto/index.js';
|
|
21
48
|
export { proto } from '../WAProto/index.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blckrose/baileys",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.6",
|
|
5
5
|
"description": "A WebSockets library for interacting with WhatsApp Web",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"whatsapp",
|
|
@@ -13,12 +13,35 @@
|
|
|
13
13
|
},
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"author": "Black Rose",
|
|
16
|
-
"main": "
|
|
17
|
-
"
|
|
16
|
+
"main": "./index.cjs",
|
|
17
|
+
"module": "./lib/index.js",
|
|
18
|
+
"types": "./index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"import": {
|
|
22
|
+
"types": "./lib/index.d.ts",
|
|
23
|
+
"default": "./lib/index.js"
|
|
24
|
+
},
|
|
25
|
+
"require": {
|
|
26
|
+
"types": "./index.d.ts",
|
|
27
|
+
"default": "./index.cjs"
|
|
28
|
+
},
|
|
29
|
+
"default": "./lib/index.js"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"typesVersions": {
|
|
33
|
+
"*": {
|
|
34
|
+
"*": [
|
|
35
|
+
"./index.d.ts"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
18
39
|
"files": [
|
|
19
40
|
"lib/**/*",
|
|
20
41
|
"WAProto/**/*",
|
|
21
|
-
"engine-requirements.js"
|
|
42
|
+
"engine-requirements.js",
|
|
43
|
+
"index.cjs",
|
|
44
|
+
"index.d.ts"
|
|
22
45
|
],
|
|
23
46
|
"scripts": {},
|
|
24
47
|
"dependencies": {
|
|
@@ -58,4 +81,4 @@
|
|
|
58
81
|
"engines": {
|
|
59
82
|
"node": ">=20.0.0"
|
|
60
83
|
}
|
|
61
|
-
}
|
|
84
|
+
}
|