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

273
Views
¿Cómo elimino una respuesta de interacción en discord.js v13?

Estoy tratando de eliminar la respuesta del bot al comando de purga del usuario.

 module.exports = { data: new SlashCommandBuilder() .setName("purge") // Command name .setDescription("Deletes a set number of messages") // Command description .addNumberOption((option) => // Adds an argument option .setName("number") // Argument name .setDescription("Sets the number of messages to delete") // Argument description .setRequired(true), // Argument requirement ), async execute(interaction) { if (interaction.member.permissions.has("MANAGE_MESSAGES") && interaction.guild.me.permissions.has("MANAGE_MESSAGES")) { await interaction.channel.bulkDelete(interaction.options.getNumber("number")); await interaction.reply(`Deleted ${interaction.options.getNumber("number")} message(s) successfully.`); setTimeout(() => interaction.message.delete(), 1000); } else if (interaction.member.permissions.has("MANAGE_MESSAGES") === false) { interaction.reply("You do not have the **Manage Messages** permission. Please ask a moderator to give you this permission.") } else { interaction.reply("I have not been given the relevant permissions to do this. Please contact a moderator and ask them to give me the **Manage Messages** permission.") } } }

Todas las soluciones que he probado arrojan un "no es una función" o "No se puede leer la propiedad de indefinido". ¿Alguien podría ayudar con esto? ¡Gracias!

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

0

Utilice <Interaction>.deleteReply()

about 4 years ago · Juan Pablo Isaza Report

0

Utilice el método .deleteReply() :

 async execute(interaction) { const replyMessage = await interaction.reply('message'); setTimeout(() => interaction.deleteReply(), 10000); }
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!