summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authordank074 <torresefrain10@gmail.com>2025-04-09 15:39:17 -0500
committerdank074 <torresefrain10@gmail.com>2025-04-09 15:39:17 -0500
commit64d5dcd53feccc25f176ed3fab45ad0de50b6367 (patch)
tree0f8aa54e103fd29375bc5646a51e599cad451fe0 /src
parentPrettier (diff)
downloadserver-ts-64d5dcd53feccc25f176ed3fab45ad0de50b6367.tar.xz
fix missing properties in GUILD_CREATE for bots
Diffstat (limited to 'src')
-rw-r--r--src/gateway/opcodes/Identify.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts

index c6f987fc7..155dcb5a7 100644 --- a/src/gateway/opcodes/Identify.ts +++ b/src/gateway/opcodes/Identify.ts
@@ -455,13 +455,16 @@ export async function onIdentify(this: WebSocket, data: Payload) { }); // If we're a bot user, send GUILD_CREATE for each unavailable guild + // TODO: check if bot has permission to view some of these based on intents (i.e. GUILD_MEMBERS, GUILD_PRESENCES, GUILD_VOICE_STATES) await Promise.all( pending_guilds.map((x) => Send(this, { op: OPCODES.Dispatch, t: EVENTEnum.GuildCreate, s: this.sequence++, - d: x, + d: { + ...new ReadyGuildDTO(x).toJSON(), + }, })?.catch((e) => console.error(`[Gateway] error when sending bot guilds`, e), ),