Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

153
Views
No se pueden leer las propiedades de undefined (leyendo 'gremios') en discord.js v13

tengo este problema y no se como solucionarlo, soy nuevo en esto, asi que si me pueden ayudar seria lo mejor :D

Error:

 let Servers = client.guilds.cache.filter(g => g) ^ TypeError: Cannot read properties of undefined (reading 'guilds')

Y este sería el fragmento de código donde se encuentra el error.

 async function checkUnbans() { let Servers = client.guilds.cache.filter(g => g) Servers.map(async g => { let SDB = await ServerSettings.findOne({GuildID: g.id}) if(!SDB) return CreateServer(g.id) let Channel = g.channels.cache.get(SDB.GuildConfig[0].ModLogs.Channel) if(Channel) { let FBanned = await ModLogs.find({GuildID: g.id}) FBanned.forEach(async (u) => { if(u.Type == "TEMPBAN") { let Time = u.Time || 0 if(parseInt(u.OcurredDate) + parseInt(Time) < Date.now()) { if(u.Unbanned == false) { let c = g.members.cache.get(u.UserID) if(!c) { let count = await ModLogs.countDocuments({GuildID: g.id}) await UnbanM(g, u, count, Channel) } } } } }) } }) }

Si esto sirve de información, así es como defino algunos elementos.

 const ServerSettings = require('../models/ServerConfigModel') const ModLogs = require('../models/ModLogs') const { CreateServer } = require('./CreateDB')
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Necesitas definir el serverL

 let server= message.guild.server.cache.find(server=> server.name === 'bot-logs')

¡Espero que esto funcione!

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!