summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-03-08 18:08:25 +0100
committerRory& <root@rory.gay>2026-03-20 18:17:47 +0100
commit66bed974ffd39d73bac5080b691b88d3358647e7 (patch)
tree90079f24bf93c4c0ac3d7d3b775c785f9afe21fe
parentMigrate PresenceUpdateEvent to satisfies, part of #1577 (diff)
downloadserver-ts-66bed974ffd39d73bac5080b691b88d3358647e7.tar.xz
Migrate Stream*Event to satisfies, part of #1577
-rw-r--r--src/gateway/opcodes/StreamCreate.ts4
-rw-r--r--src/gateway/opcodes/StreamDelete.ts4
-rw-r--r--src/gateway/opcodes/StreamWatch.ts4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/gateway/opcodes/StreamCreate.ts b/src/gateway/opcodes/StreamCreate.ts

index 69d4619d..d1faffb1 100644 --- a/src/gateway/opcodes/StreamCreate.ts +++ b/src/gateway/opcodes/StreamCreate.ts
@@ -90,7 +90,7 @@ export async function onStreamCreate(this: WebSocket, data: Payload) { paused: false, }, user_id: this.user_id, - } as StreamCreateEvent); + } satisfies StreamCreateEvent); await emitEvent({ event: "STREAM_SERVER_UPDATE", @@ -101,7 +101,7 @@ export async function onStreamCreate(this: WebSocket, data: Payload) { endpoint: stream.endpoint, }, user_id: this.user_id, - } as StreamServerUpdateEvent); + } satisfies StreamServerUpdateEvent); voiceState.self_stream = true; await voiceState.save(); diff --git a/src/gateway/opcodes/StreamDelete.ts b/src/gateway/opcodes/StreamDelete.ts
index 66db34e7..aaa3361c 100644 --- a/src/gateway/opcodes/StreamDelete.ts +++ b/src/gateway/opcodes/StreamDelete.ts
@@ -33,7 +33,7 @@ export async function onStreamDelete(this: WebSocket, data: Payload) { stream_key: body.stream_key, }, user_id: this.user_id, - } as StreamDeleteEvent); + } satisfies StreamDeleteEvent); return; } @@ -72,7 +72,7 @@ export async function onStreamDelete(this: WebSocket, data: Payload) { }, guild_id: guildId, channel_id: channelId, - } as StreamDeleteEvent); + } satisfies StreamDeleteEvent); console.log(`[Gateway/${this.user_id}] STREAM_DELETE for user ${this.user_id} in channel ${channelId} with stream key ${body.stream_key} in ${Date.now() - startTime}ms`); } diff --git a/src/gateway/opcodes/StreamWatch.ts b/src/gateway/opcodes/StreamWatch.ts
index 92588a9d..040fb954 100644 --- a/src/gateway/opcodes/StreamWatch.ts +++ b/src/gateway/opcodes/StreamWatch.ts
@@ -69,7 +69,7 @@ export async function onStreamWatch(this: WebSocket, data: Payload) { }, channel_id: channelId, user_id: this.user_id, - } as StreamCreateEvent); + } satisfies StreamCreateEvent); await emitEvent({ event: "STREAM_SERVER_UPDATE", @@ -80,7 +80,7 @@ export async function onStreamWatch(this: WebSocket, data: Payload) { endpoint: stream.endpoint, }, user_id: this.user_id, - } as StreamServerUpdateEvent); + } satisfies StreamServerUpdateEvent); console.log(`[Gateway/${this.user_id}] STREAM_WATCH for user ${this.user_id} in channel ${channelId} with stream key ${body.stream_key} in ${Date.now() - startTime}ms`); }