diff --git a/services/kanao-cache/src/Listeners/Caches/Guilds/GuildCreateListener.ts b/services/kanao-cache/src/Listeners/Caches/Guilds/GuildCreateListener.ts index 9d771542..37263a0b 100644 --- a/services/kanao-cache/src/Listeners/Caches/Guilds/GuildCreateListener.ts +++ b/services/kanao-cache/src/Listeners/Caches/Guilds/GuildCreateListener.ts @@ -117,7 +117,7 @@ export class GuildCreateListener extends Listener { } }); - if (stateRoles) { + if (stateRoles && payload.data.d.roles.length > 0) { for (const role of payload.data.d.roles) { // @ts-expect-error Intended to avoid .map role.guildId = payload.data.d.id;