mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-23 19:33:05 +00:00
properly mark unused params
This commit is contained in:
1 parent
27cb026967
commit
a451f92e67
27 files changed
+78
-39
No files matched your search
@@ -21,13 +21,6 @@ import { Tuple } from "lambert-server";
|
||||
import OPCodeHandlers from "../opcodes";
|
||||
import { VoiceOPCodes, VoicePayload, WebRtcWebSocket } from "../util";
|
||||
|
||||
const PayloadSchema = {
|
||||
op: Number,
|
||||
$d: new Tuple(Object, Number), // or number for heartbeat sequence
|
||||
$s: Number,
|
||||
$t: String,
|
||||
};
|
||||
|
||||
export async function onMessage(this: WebRtcWebSocket, buffer: Buffer) {
|
||||
try {
|
||||
const data: VoicePayload = JSON.parse(buffer.toString());
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
import { VoiceOPCodes, VoicePayload, WebRtcWebSocket, Send } from "../util";
|
||||
|
||||
export async function onBackendVersion(this: WebRtcWebSocket, data: VoicePayload) {
|
||||
export async function onBackendVersion(this: WebRtcWebSocket, _: VoicePayload) {
|
||||
await Send(this, {
|
||||
op: VoiceOPCodes.VOICE_BACKEND_VERSION,
|
||||
d: { voice: "0.8.43", rtc_worker: "0.3.26" },
|
||||
|
||||
@@ -25,6 +25,7 @@ import { subscribeToProducers } from "./Video";
|
||||
|
||||
export async function onIdentify(this: WebRtcWebSocket, data: VoicePayload) {
|
||||
clearTimeout(this.readyTimeout);
|
||||
// noinspection JSUnusedLocalSymbols - TODO: use video?
|
||||
const { server_id, user_id, session_id, token, streams, video } = validateSchema("VoiceIdentifySchema", data.d) as VoiceIdentifySchema;
|
||||
|
||||
// server_id can be one of the following: a unique id for a GO Live stream, a channel id for a DM voice call, or a guild id for a guild voice channel
|
||||
|
||||
@@ -53,7 +53,7 @@ export async function onVideo(this: WebRtcWebSocket, payload: VoicePayload) {
|
||||
if (wantsToProduceAudio) {
|
||||
try {
|
||||
await Promise.race([
|
||||
new Promise<void>((resolve, reject) => {
|
||||
new Promise<void>((resolve, _) => {
|
||||
this.webRtcClient?.emitter.once("connected", () => resolve());
|
||||
}),
|
||||
new Promise<void>((resolve, reject) => {
|
||||
|
||||
Reference in new issue
Block a user