From e8f3b590c11c5e966f72ea3d0199c2e64a0cbce1 Mon Sep 17 00:00:00 2001 From: Elysia <71698422+aiko-chan-ai@users.noreply.github.com> Date: Sat, 3 Jun 2023 17:21:41 +0700 Subject: [PATCH] Update READY.js --- src/client/websocket/handlers/READY.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/websocket/handlers/READY.js b/src/client/websocket/handlers/READY.js index 1bb50ad..aa41413 100644 --- a/src/client/websocket/handlers/READY.js +++ b/src/client/websocket/handlers/READY.js @@ -140,7 +140,7 @@ module.exports = async (client, { d: data }, shard) => { client.guilds._add(guild); } - for (const gSetting of data.user_guild_settings) { + 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); }