summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gateway/opcodes/Identify.ts21
-rw-r--r--src/util/interfaces/Event.ts1
2 files changed, 21 insertions, 1 deletions
diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts
index 0f91df3e..bab52279 100644
--- a/src/gateway/opcodes/Identify.ts
+++ b/src/gateway/opcodes/Identify.ts
@@ -53,6 +53,7 @@ import {
 	DMChannel,
 	GuildOrUnavailable,
 	Recipient,
+	OPCodes,
 } from "@spacebar/util";
 import { check } from "./instanceOf";
 
@@ -441,7 +442,25 @@ export async function onIdentify(this: WebSocket, data: Payload) {
 		),
 	);
 
-	//TODO send READY_SUPPLEMENTAL
+	// TODO: ready supplemental
+	await Send(this, {
+		op: OPCodes.DISPATCH,
+		t: EVENTEnum.ReadySupplemental,
+		s: this.sequence++,
+		d: {
+			merged_presences: {
+				guilds: [],
+				friends: [],
+			},
+			// these merged members seem to be all users currently in vc in your guilds
+			merged_members: [],
+			lazy_private_channels: [],
+			guilds: [], // { voice_states: [], id: string, embedded_activities: [] }
+			// embedded_activities are users currently in an activity?
+			disclose: ["pomelo"],
+		},
+	});
+
 	//TODO send GUILD_MEMBER_LIST_UPDATE
 	//TODO send VOICE_STATE_UPDATE to let the client know if another device is already connected to a voice channel
 
diff --git a/src/util/interfaces/Event.ts b/src/util/interfaces/Event.ts
index 7ddb763d..deb54428 100644
--- a/src/util/interfaces/Event.ts
+++ b/src/util/interfaces/Event.ts
@@ -583,6 +583,7 @@ export type EventData =
 
 export enum EVENTEnum {
 	Ready = "READY",
+	ReadySupplemental = "READY_SUPPLEMENTAL",
 	ChannelCreate = "CHANNEL_CREATE",
 	ChannelUpdate = "CHANNEL_UPDATE",
 	ChannelDelete = "CHANNEL_DELETE",