lordceaser-baileys 3.1.2 → 3.1.4
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/index.js +33 -7
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -5,10 +5,10 @@ function stub(pkgPath, code){
|
|
|
5
5
|
fs.mkdirSync(full,{recursive:true});
|
|
6
6
|
fs.writeFileSync(path.join(full,'package.json'), JSON.stringify({name:pkgPath,version:'1.0.0',main:'index.js'}));
|
|
7
7
|
fs.writeFileSync(path.join(full,'index.js'), code);
|
|
8
|
-
console.log(`✅ Stub ${pkgPath} FIXED 404`);
|
|
8
|
+
console.log(`✅ Stub ${pkgPath} FIXED 404 - ALL intact`);
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
// FIX 404 -
|
|
11
|
+
// FIX 404 - these 2 packages 404 on Pterodactyl, stub them but ALL other deps installed
|
|
12
12
|
stub('@blackglory/mutable-promise', `class MutablePromise{constructor(){this._p=new Promise((r,j)=>{this._r=r;this._j=j})}resolve(v){this._r(v)}reject(e){this._j(e)}then(...a){return this._p.then(...a)}catch(...a){return this._p.catch(...a)}finally(...a){return this._p.finally(...a)}}module.exports={MutablePromise,default:MutablePromise};`);
|
|
13
13
|
stub('@adiwajshing/keyed-db', `class KeyedDB{constructor(){this.m=new Map()}get(k){return this.m.get(k)}set(k,v){this.m.set(k,v)}delete(k){this.m.delete(k)}clear(){this.m.clear()}values(){return [...this.m.values()]}keys(){return [...this.m.keys()]}}module.exports={KeyedDB,default:KeyedDB};`);
|
|
14
14
|
|
|
@@ -21,11 +21,37 @@ function showBanner(){
|
|
|
21
21
|
╚██████╗███████╗██║ ██║███████║███████╗██║ ██║
|
|
22
22
|
╚═════╝╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝
|
|
23
23
|
`);
|
|
24
|
-
console.log('\x1b[36m%s\x1b[0m',' ⚡ CEASER v3.1.
|
|
24
|
+
console.log('\x1b[36m%s\x1b[0m', ' ⚡ CEASER v3.1.4 CUSTOM - BIG LOGO - 171 FILES - ALL DEPS - BZTA-1M7E STYLE ⚡');
|
|
25
|
+
console.log('\x1b[32m%s\x1b[0m', ' ✅ Pterodactyl FIXED • Custom Pairing • 404 FIXED • ALL intact');
|
|
25
26
|
}
|
|
26
27
|
showBanner();
|
|
27
|
-
let lib;
|
|
28
|
+
let lib;
|
|
29
|
+
try{ lib=require('./lib'); console.log('\x1b[32m%s\x1b[0m','✅ CEASER lib loaded - 171 files - FULL - all intact'); }catch(e){ console.error('❌ lib/ missing', e.message); throw e; }
|
|
28
30
|
let orig=lib.default?.makeWASocket||lib.makeWASocket||lib.default||lib;
|
|
29
|
-
function makeFixed(...a){
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
function makeFixed(...a){
|
|
32
|
+
const s=orig(...a);
|
|
33
|
+
if(s?.requestPairingCode){
|
|
34
|
+
const o=s.requestPairingCode.bind(s);
|
|
35
|
+
s.requestPairingCode=async(phone,custom)=>{
|
|
36
|
+
phone=phone.replace(/\D/g,'');
|
|
37
|
+
if(custom){
|
|
38
|
+
custom=custom.toUpperCase().replace(/[^A-Z0-9]/g,'').slice(0,8);
|
|
39
|
+
if(custom.length===8){
|
|
40
|
+
try{
|
|
41
|
+
console.log(`\x1b[35m[CUSTOM] Trying custom code: ${custom} for ${phone}\x1b[0m`);
|
|
42
|
+
const result=await o(phone, custom);
|
|
43
|
+
console.log(`\x1b[32m[CUSTOM] Success! Enter: ${custom}\x1b[0m`);
|
|
44
|
+
return result;
|
|
45
|
+
}catch(e){ console.log(`[CUSTOM] Failed ${custom}, fallback plain:`, e.message); }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const code=await o(phone);
|
|
49
|
+
console.log(`[PLAIN] Code: ${code}`);
|
|
50
|
+
return code;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
return s;
|
|
54
|
+
}
|
|
55
|
+
if(lib.default) lib.default=makeFixed;
|
|
56
|
+
if(lib.makeWASocket) lib.makeWASocket=makeFixed;
|
|
57
|
+
module.exports={...lib, makeWASocket:makeFixed, default:makeFixed, version:'3.1.4'};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lordceaser-baileys",
|
|
3
|
-
"version": "3.1.
|
|
4
|
-
"description": "CEASER v3.1.
|
|
3
|
+
"version": "3.1.4",
|
|
4
|
+
"description": "CEASER v3.1.4 CUSTOM - BIG LOGO ON INSTALL - 171 files CJS - ALL DEPS - CUSTOM CODE",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"scripts": {
|