Fix worker websocket runtime
This commit is contained in:
parent
5b356c2cf6
commit
42c9101a9f
2 changed files with 7 additions and 1 deletions
|
|
@ -11,6 +11,7 @@
|
||||||
"@dank074/discord-video-stream": "6.0.0",
|
"@dank074/discord-video-stream": "6.0.0",
|
||||||
"discord.js-selfbot-v13": "^3.7.1",
|
"discord.js-selfbot-v13": "^3.7.1",
|
||||||
"dotenv": "^17.3.1",
|
"dotenv": "^17.3.1",
|
||||||
"node-gyp": "^11.2.0"
|
"node-gyp": "^11.2.0",
|
||||||
|
"ws": "^8.18.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,10 @@
|
||||||
const http = require("http");
|
const http = require("http");
|
||||||
const { URL } = require("url");
|
const { URL } = require("url");
|
||||||
|
const WebSocket = require("ws");
|
||||||
|
|
||||||
|
if (typeof globalThis.WebSocket === "undefined") {
|
||||||
|
globalThis.WebSocket = WebSocket;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
require("dotenv").config();
|
require("dotenv").config();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue