diff --git a/eslint.config.mjs b/eslint.config.mjs index 1f678d5..8658272 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -21,7 +21,6 @@ "**/dist", "**/README.md", "**/COPYING", - "src/webrtc", "**/scripts/", "**/assets", ], diff --git a/src/webrtc/opcodes/Identify.ts b/src/webrtc/opcodes/Identify.ts index 9bcaa67..29b85e1 100644 --- a/src/webrtc/opcodes/Identify.ts +++ b/src/webrtc/opcodes/Identify.ts @@ -46,7 +46,7 @@ let authenticated = false; // first check if its a guild voice connection or DM voice call - let voiceState = await VoiceState.findOne({ + const voiceState = await VoiceState.findOne({ where: [ { guild_id: server_id, user_id, token, session_id }, { channel_id: server_id, user_id, token, session_id }, diff --git a/src/webrtc/opcodes/index.ts b/src/webrtc/opcodes/index.ts index 71c5f2e..da561f8 100644 --- a/src/webrtc/opcodes/index.ts +++ b/src/webrtc/opcodes/index.ts @@ -24,7 +24,10 @@ import { onSpeaking } from "./Speaking"; import { onVideo } from "./Video"; -export type OPCodeHandler = (this: WebRtcWebSocket, data: VoicePayload) => any; +export type OPCodeHandler = ( + this: WebRtcWebSocket, + data: VoicePayload, +) => Promise; export default { [VoiceOPCodes.HEARTBEAT]: onHeartbeat, diff --git a/src/webrtc/start.ts b/src/webrtc/start.ts index 1793b39..cce1c16 100644 --- a/src/webrtc/start.ts +++ b/src/webrtc/start.ts @@ -15,7 +15,8 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ - +import moduleAlias from "module-alias"; +moduleAlias(__dirname + "../../../package.json"); process.on("uncaughtException", console.error); process.on("unhandledRejection", console.error); diff --git a/src/webrtc/util/MediaServer.ts b/src/webrtc/util/MediaServer.ts index 793419c..1c7e220 100644 --- a/src/webrtc/util/MediaServer.ts +++ b/src/webrtc/util/MediaServer.ts @@ -50,6 +50,7 @@ if (!selectedWrtcLibrary) throw new NoConfiguredLibraryError("No library configured in .env"); + // eslint-disable-next-line @typescript-eslint/ban-ts-comment mediaServer = new // @ts-ignore (await import(selectedWrtcLibrary)).default();