Initial voice chat #42

This commit is contained in:
2026-01-07 17:12:36 +01:00
parent 2c266742b2
commit 1577ce38e1
2 changed files with 14 additions and 1 deletions
+6
View File
@@ -84,6 +84,12 @@ export default async function auth({
case "authenticated":
if (!onIndicator) break;
msg.params.indicators.forEach(onIndicator);
if (!onVoiceJoin) break;
Object.entries(msg.params.voice_chat).forEach(([channelId, users]) =>
Object.entries(users).forEach(([userId, voiceId]) =>
onVoiceJoin(userId, channelId, voiceId)
)
);
break;
case "message_create":
+8 -1
View File
@@ -25,7 +25,14 @@ export type ClientMessage =
| EnumType<"leave_voice", { channel_id: string }>;
export type ServerMessage =
| EnumType<"authenticated", { uuid: string; indicators: IndicatorContext[] }>
| EnumType<
"authenticated",
{
uuid: string;
indicators: IndicatorContext[];
voice_chat: Record<string, Record<string, number>>;
}
>
| EnumType<"temp_message", { message: string }>
| EnumType<"message_create", Message>
| EnumType<"message_update", { message_id: number; contents: string }>