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

137
Views
cómo usar el parámetro de mensaje fuera de `messageCreate`

Tengo problemas para obtener la definición del parámetro del mensaje fuera del client.on('messageCreate', async message) . Debido a que uso discord-music-player , tiene sus propios eventos que están fuera del evento messageCreate y el bot ahora no puede enviar el mensaje cuando desencadeno un evento discord-music-player .
Entonces, ¿cómo paso el evento del mensaje a un evento discord-music-player discord?

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

0

Quizás desee utilizar una variable global. Declarar una variable fuera del evento guardará el valor.

 var lastMessage = null client.on("messageCreate", async message => { lastMessage = message //rest of your callback }) //once a message is received, lastMessage will be the message object, updating on each message
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!