erlpack require
This commit is contained in:
parent
861d95bd06
commit
c801b09e9c
|
@ -27603,6 +27603,7 @@ class SocketProxy extends Module {
|
|||
|
||||
bindings() {
|
||||
this.socketCreated = this.socketCreated.bind(this);
|
||||
window.test = this;
|
||||
}
|
||||
|
||||
socketCreated() {
|
||||
|
@ -27610,6 +27611,23 @@ class SocketProxy extends Module {
|
|||
console.log(Global.getObject('wsHook'));
|
||||
}
|
||||
|
||||
get erlpack() {
|
||||
if (this._erlpack) return this._erlpack;
|
||||
|
||||
try {
|
||||
this._erlpack = window.require('erlpack');
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
try {
|
||||
this._erlpack = window.require('discord_erlpack');
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
|
||||
return this._erlpack;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const _instance = new SocketProxy();
|
||||
|
|
|
@ -20,6 +20,7 @@ class SocketProxy extends Module {
|
|||
|
||||
bindings() {
|
||||
this.socketCreated = this.socketCreated.bind(this);
|
||||
window.test = this;
|
||||
}
|
||||
|
||||
socketCreated() {
|
||||
|
@ -27,6 +28,23 @@ class SocketProxy extends Module {
|
|||
console.log(Global.getObject('wsHook'));
|
||||
}
|
||||
|
||||
get erlpack() {
|
||||
if (this._erlpack) return this._erlpack;
|
||||
|
||||
try {
|
||||
this._erlpack = window.require('erlpack');
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
try {
|
||||
this._erlpack = window.require('discord_erlpack');
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
|
||||
return this._erlpack;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const _instance = new SocketProxy();
|
||||
|
|
Loading…
Reference in New Issue