summary refs log tree commit diff
path: root/src/gateway
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-03-14 03:59:28 +0100
committerRory& <root@rory.gay>2026-03-14 03:59:28 +0100
commita451f92e67ee51136d4841fdda6befe8629a298b (patch)
tree822c6a6f1e5338ea013b92fae5e149163760ec97 /src/gateway
parentlambert-server: remove unused code (diff)
downloadserver-ts-a451f92e67ee51136d4841fdda6befe8629a298b.tar.xz
properly mark unused params
Diffstat (limited to 'src/gateway')
-rw-r--r--src/gateway/Server.ts6
-rw-r--r--src/gateway/opcodes/Identify.ts5
-rw-r--r--src/gateway/opcodes/LazyRequest.ts1
-rw-r--r--src/gateway/opcodes/StreamDelete.ts1
-rw-r--r--src/gateway/util/Utils.ts2
5 files changed, 6 insertions, 9 deletions
diff --git a/src/gateway/Server.ts b/src/gateway/Server.ts

index 7fea1a27..c6419cfa 100644 --- a/src/gateway/Server.ts +++ b/src/gateway/Server.ts
@@ -38,9 +38,9 @@ export class Server { if (server) this.server = server; else { - const elu = [1, 5, 15].map((x) => performance.eventLoopUtilization()); - const eluP = [1, 5, 15].map((x) => performance.eventLoopUtilization()); - const cpu = [1, 5, 15].map((x) => process.cpuUsage()); + const elu = [1, 5, 15].map(() => performance.eventLoopUtilization()); + const eluP = [1, 5, 15].map(() => performance.eventLoopUtilization()); + const cpu = [1, 5, 15].map(() => process.cpuUsage()); let sec = 0; setInterval(() => { sec += 1; diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts
index 65c54ae0..7dd21658 100644 --- a/src/gateway/opcodes/Identify.ts +++ b/src/gateway/opcodes/Identify.ts
@@ -64,11 +64,6 @@ import { ChannelType, DefaultUserGuildSettings, DMChannel, IdentifySchema, Priva // TODO: user sharding // TODO: check privileged intents, if defined in the config -function logAuth(message: string) { - if (process.env.LOG_AUTH != "true") return; - console.log(`[Gateway/Auth] ${message}`); -} - export async function onIdentify(this: WebSocket, data: Payload) { const totalSw = Stopwatch.startNew(); const taskSw = Stopwatch.startNew(); diff --git a/src/gateway/opcodes/LazyRequest.ts b/src/gateway/opcodes/LazyRequest.ts
index 0e63a7d2..cb465cf0 100644 --- a/src/gateway/opcodes/LazyRequest.ts +++ b/src/gateway/opcodes/LazyRequest.ts
@@ -158,6 +158,7 @@ export async function onLazyRequest(this: WebSocket, { d }: Payload) { const startTime = Date.now(); // TODO: check data check.call(this, LazyRequestSchema, d); + // noinspection JSUnusedLocalSymbols - TODO: implement typing/activities subscriptions const { guild_id, typing, channels, activities, members } = d as LazyRequestSchema; if (members) { diff --git a/src/gateway/opcodes/StreamDelete.ts b/src/gateway/opcodes/StreamDelete.ts
index c5d8bec3..6135e1f3 100644 --- a/src/gateway/opcodes/StreamDelete.ts +++ b/src/gateway/opcodes/StreamDelete.ts
@@ -21,6 +21,7 @@ export async function onStreamDelete(this: WebSocket, data: Payload) { return this.close(4000, "Invalid stream key"); } + // noinspection JSUnusedLocalSymbols - TODO: what is type here? const { userId, channelId, guildId, type } = parsedKey; // when a user selects to stop watching another user stream, this event gets triggered diff --git a/src/gateway/util/Utils.ts b/src/gateway/util/Utils.ts
index ec0f411c..1ca45ee4 100644 --- a/src/gateway/util/Utils.ts +++ b/src/gateway/util/Utils.ts
@@ -58,7 +58,7 @@ export async function cleanupOnStartup(): Promise<void> { console.log("[Gateway] Starting async voice state wipe..."); VoiceState.clear() - .then((e) => console.log("[Gateway] Successfully cleaned voice states")) + .then(() => console.log("[Gateway] Successfully cleaned voice states")) .catch((e) => console.error("[Gateway] Error cleaning voice states on startup:", e)); }