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

180
Views
¿Es posible que un bot lea un mensaje dm discord.js?

Así que estoy creando un bot de discordia y lo estoy haciendo para 2 servidores, así que hice que el bot me enviara un mensaje y luego traté de hacer que esperara una respuesta mía que es "eb" o "guap" y dependiendo de cuál. Lo escojo define el canal. esto es lo que tengo

 client.once('ready', async () => { // [beta] const storedBalances = await Users.findAll(); storedBalances.forEach(b => currency.set(b.user_id, b)); console.log(`Logged in as ${client.user.tag}!`); client.users.cache.get('461694991467544577').send('what server').then((msg) => { console.log("are we making it this far") msg.channel.awaitMessages({ filter: (m) => { return true }, max: 1 }).then((collected) => { console.log(collected); if (collected.first().content === "guap") { client.channels.fetch("724610473982558221").then((c) => { channel = c; }) console.log("fetching guaps server"); } if (collected.first().content === "eb") { client.channels.fetch("961598555515158568").then((c) => { channel = c; }) console.log("fetching eb's server"); } }).catch(()=>{ console.log("AwaitMessages Failed"); }) }); });
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!