title: How do I delete an interaction reply in discord.js v13?
body: <p>I'm trying to delete the bot's reply to the user's purge command.</p>
  <pre><code>module.exports = {
      data: new SlashCommandBuilder()
          .setName(&quot;purge&quot;) // Command name
          .setDescription(&quot;Deletes a set number of messages&quot;) // Command description
          .addNumberOption((option) =&gt; // Adds an argument
              option 
                  .setName(&quot;number&quot;) // Argument name
                  .setDescription(&quot;Sets the number of messages to delete&quot;) // Argument description
                  .setRequired(true), // Argument requirement
          ),
      async execute(interaction) {
          if (interaction.member.permissions.has(&quot;MANAGE_MESSAGES&quot;) &amp;&amp; interaction.guild.me.permissions.has(&quot;MANAGE_MESSAGES&quot;)) {
              await interaction.channel.bulkDelete(interaction.options.getNumber(&quot;number&quot;));
              await interaction.reply(`Deleted ${interaction.options.getNumber(&quot;number&quot;)} message(s) successfully.`);
              setTimeout(() =&gt; interaction.message.delete(), 1000);
          } else if (interaction.member.permissions.has(&quot;MANAGE_MESSAGES&quot;) === false) {
              interaction.reply(&quot;You do not have the **Manage Messages** permission. Please ask a moderator to give you this permission.&quot;)
          } else {
              interaction.reply(&quot;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.&quot;)
          }
      }
  }
  </code></pre>
  <p>All the solutions I have tried all throw a &quot; is not a function&quot; or &quot;Cannot read the property of undefined&quot;. Could anyone help with this? Thanks!</p>