• Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses and challenges
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

239
Views
Discord JS - delete a reply message

I'm trying to delete certain message with certain event like this:

await interaction.reply({ content: `content` })
            .then(message => {
                console.log(message);
                client.on('messageDelete', async () => {
                    await message.delete();
                });
            });

But I get undefined in a console.log as a message. What is wrong? I already done the message delition with .then() and it worked, but now something is wrong. Maybe because it is reply, not just plain message?

9 months ago · Juan Pablo Isaza
1 answers
Answer question

0

You can delete a reply to an interaction by using deleteReply()

// Delete the reply to this interaction
interaction.deleteReply()
  .then(console.log)
  .catch(console.error);
9 months 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 job Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2023 PeakU Inc. All Rights Reserved.