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

277
Views
¿El comando está funcionando, pero también está obteniendo una "interacción fallida" al mismo tiempo?

El título puede ser un poco confuso, así que aquí hay una captura de pantalla de lo que sucede cuando escribo un comando:

ingrese la descripción de la imagen aquí

Funciona, pero luego falla al mismo tiempo. No recibo errores de esta interacción. Aquí está mi código:

 const { SlashCommandBuilder } = require("@discordjs/builders"); const { MessageEmbed } = require("discord.js"); module.exports = { data: new SlashCommandBuilder() .setName("suggest") .setDescription("Send your suggestion to the specified channel") .addStringOption((option) => option .setName("suggestion") .setDescription("Your suggestion") .setRequired(true) ), async execute(interaction) { let suggestion = interaction.options.getString("suggestion"); const embed = new MessageEmbed() .setColor("#0099ff") .setTitle(`New suggestion by ${interaction.member.displayName}`) .setDescription(`${suggestion}`); await interaction.channel .send({ embeds: [embed], }) .then(function (interaction) { interaction.react(`👍`).then(interaction.react(`👎`)); }); }, };
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Prueba a aplazar la respuesta. Más info al respecto aquí

Por ejemplo,

 const wait = require('util').promisify(setTimeout); client.on('interactionCreate', async interaction => { if (!interaction.isCommand()) return; if (interaction.commandName === 'ping') { await interaction.deferReply(); await wait(4000); await interaction.editReply('Pong!'); } });
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!