fix missing properties in GUILD_CREATE for bots
This commit is contained in:
parent
126a881f31
commit
64d5dcd53f
@ -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),
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user