send empty READY_SUPPLEMENTAL for client compatibility
This commit is contained in:
parent
a0d93fb252
commit
4c0b1391b1
@ -53,6 +53,7 @@ import {
|
|||||||
DMChannel,
|
DMChannel,
|
||||||
GuildOrUnavailable,
|
GuildOrUnavailable,
|
||||||
Recipient,
|
Recipient,
|
||||||
|
OPCodes,
|
||||||
} from "@spacebar/util";
|
} from "@spacebar/util";
|
||||||
import { check } from "./instanceOf";
|
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 GUILD_MEMBER_LIST_UPDATE
|
||||||
//TODO send VOICE_STATE_UPDATE to let the client know if another device is already connected to a voice channel
|
//TODO send VOICE_STATE_UPDATE to let the client know if another device is already connected to a voice channel
|
||||||
|
|
||||||
|
@ -583,6 +583,7 @@ export type EventData =
|
|||||||
|
|
||||||
export enum EVENTEnum {
|
export enum EVENTEnum {
|
||||||
Ready = "READY",
|
Ready = "READY",
|
||||||
|
ReadySupplemental = "READY_SUPPLEMENTAL",
|
||||||
ChannelCreate = "CHANNEL_CREATE",
|
ChannelCreate = "CHANNEL_CREATE",
|
||||||
ChannelUpdate = "CHANNEL_UPDATE",
|
ChannelUpdate = "CHANNEL_UPDATE",
|
||||||
ChannelDelete = "CHANNEL_DELETE",
|
ChannelDelete = "CHANNEL_DELETE",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user