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

286
Views
¿Hay alguna forma de almacenar en una variable lo que escribe un usuario después de un comando para un bot de discordia? (discord js)

Quiero crear un comando de 'cambiador de prefijo'. Quiero que el bot almacene lo que el usuario escriba después del comando en una variable.

 const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] }); client.on('ready', () => { console.log('Bot Online'); }); var prefix = "!" client.on(`message`, message => { if (message.content === prefix + `ping`) { message.channel.send("Pong! 🏓"); } if (message.content === prefix + `help`) { message.channel.send('COMMANDS LIST:\n**' + prefix + 'ping** - Pong!'); } if (message.mentions.has(client.user.id)) { message.channel.send("Why you ping me??"); } if(message.content.startsWith(prefix + `prefix`)) { prefix = //message after '!prefix' message.channel.send("Prefix has now been updated to " + prefix) } }); client.login('BOT-TOKEN');
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!