Update READY.js

This commit is contained in:
Elysia 2024-01-24 18:14:47 +07:00
parent e005ad837e
commit 742263ad8d

View File

@ -38,6 +38,12 @@ module.exports = (client, { d: data }, shard) => {
// ClientSetting // ClientSetting
client.settings._patch(data.user_settings); 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) { if (largeGuilds.length) {
client.ws.broadcast({ client.ws.broadcast({
op: Opcodes.GUILD_SUBSCRIPTIONS_BULK, op: Opcodes.GUILD_SUBSCRIPTIONS_BULK,