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

339
Views
discord.js No se pueden leer las propiedades de undefined (leyendo 'enviar') después de enviar el mensaje
Client.once('ready', () => { console.log('Bot online') }); Client.on("message", message => { if (message.channel.id = '915302302682873909') { const logChannel = Client.channels.cache.find(channel => channel.id === "915302371519770664"); //send author logChannel.send(`${message.author}` + ": ") .then(message => console.log(`Sent message: ${message.content}`)); //send message content logChannel.send(message.content) .then(message => console.log(`Sent message: ${message.content}`)); } })

Si inicio mi bot y envío un mensaje para ver si funciona, envía `${message.author}` + ": " como debería, pero luego falla inmediatamente diciendo TypeError: Cannot read properties of undefined (reading 'send') Lo que también es realmente extraño es que en algún momento (no pude averiguar cuándo) envía `${message.author}` + ": " y message.content antes de bloquearse.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Esto significa que logChannel no está definido.

Si su identificación es correcta, podría definirla así:

 const logChannel = Client.channels.cache.get('915302371519770664') || Client.channels.fetch('915302371519770664');```
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!