Initial voice chat #42
This commit is contained in:
@@ -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":
|
||||
|
||||
@@ -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 }>
|
||||
|
||||
Reference in New Issue
Block a user