What even is the intent Intents.FLAGS.GUILDS, I’ve never heard of that. Maybe this is what you’re intending of achieving:

const client = new Discord.Client({ intents: ["GUILDS", "GUILD_MESSAGES"] })