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

296
Views
Error debajo de TypeError: no se pueden leer las propiedades de undefined (leyendo 'canales')

Tengo este pequeño problema en el que aparece el mensaje No se pueden leer las propiedades de un error indefinido, pero no sé dónde está el problema. ¿Puede alguien ayudarme con este?

 const Discord = require('discord.js'); const client = new Discord.Client({ intents: ["GUILDS", "GUILD_MESSAGES"] }, { partials: ["MESSAGE", "CHANNEL", "REACTION" ]}) const { prefix, token } = require ('./config.json'); const fs = require('fs'); client.commands = new Discord.Collection(); const commandFiles = fs.readdirSync('./commands/').filter(file => file.endsWith('.js')); for (const file of commandFiles) { const command = require(`./commands/${file}`); client.commands.set(command.name, command); } var serverID = '832712939457871882'; var channelID = '832712940562022480'; var messageID = '833299637996748800'; var categoryID= '833295884992643102'; client.on('ready', () => { console.log("[+] bot is up!") //Ticket module client.guilds.cache.get(serverID) //serverID .channels.cache.get(channelID) //channelID .messages.fetch(messageID).then(msg => msg.react('🎟️')) //messageID });

ERROR

 C:\Users\MIG TECNICA\Desktop\dbotrp\index.js:35 .channels.cache.get(channelID) //channelID ^ TypeError: Cannot read properties of undefined (reading 'channels')
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Use client.guilds.fetch('guild id here').channels.cache.find(c => c.id === 'channel id here').messages.fetch('message id here').then(msg => { msg.react('emoji here'); });

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!