Update READY.js

This commit is contained in:
Elysia 2023-06-03 17:21:41 +07:00
parent c33767095c
commit e8f3b590c1

View File

@ -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);
}