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

211
Views
TypeError: no se pueden leer las propiedades de undefined (leyendo 'crea')

Estoy tratando de verificar si mongodb tiene un valor para ejecutar un evento, tengo el código

if (guildSchema.events.channel.creates.enabled === false) {

Y en la base de datos, la ruta es eventos -> canal -> crea -> habilitado

https://prnt.sc/xnJIyZxjBz7_

pero al crear un canal devuelve el error TypeError: Cannot read properties of undefined (reading 'creates')

Código:

 const guildSchema = require('../../models/guildSchema'); const data = await guildSchema.findOne({ id: channel.guild.id }); if (!data) { return; } if (data) { if (guildSchema.events.channel.creates.enabled === false) { // CODE } else { return; } }
about 4 years ago · Juan Pablo Isaza
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!