From 742263ad8d081451029828edaa242a1f10e853f7 Mon Sep 17 00:00:00 2001 From: Elysia <71698422+aiko-chan-ai@users.noreply.github.com> Date: Wed, 24 Jan 2024 18:14:47 +0700 Subject: [PATCH] Update READY.js --- src/client/websocket/handlers/READY.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/client/websocket/handlers/READY.js b/src/client/websocket/handlers/READY.js index fcf26b3..c39cc6d 100644 --- a/src/client/websocket/handlers/READY.js +++ b/src/client/websocket/handlers/READY.js @@ -38,6 +38,12 @@ module.exports = (client, { d: data }, shard) => { // ClientSetting client.settings._patch(data.user_settings); + // GuildSetting + for (const gSetting of Array.isArray(data.user_guild_settings) ? data.user_guild_settings : []) { + const guild = client.guilds.cache.get(gSetting.guild_id); + if (guild) guild.settings._patch(gSetting); + } + if (largeGuilds.length) { client.ws.broadcast({ op: Opcodes.GUILD_SUBSCRIPTIONS_BULK,