DiscordJS v13 – Make the user confirm before executing something or store data so it would execute after user confirmed

I have a clear command that is implemented like this

async execute(interaction) {
  const amount = interaction.options.getInteger('amount')
  
  if (interaction.member.permissions.has(Permissions.FLAGS.ADMINISTRATOR)) {
    if (amount <= 100) {
      interaction.channel.bulkDelete(amount)
      .then(console.log(`Cleared ${amount} messages`))
      .catch(console.error)
      await interaction.reply({ content: `Cleared `${amount}` messages`, ephemeral: true })
    } else {
      interaction.channel.bulkDelete(100)
      await interaction.reply({ content: `Cleared `100` messagesnIt seems like you've somehow bypassed the 1-100 integer limitn>100 clear is dangerous and won't be implemented (learning from past mistake)`, ephemeral: true })
    }
  } else {
    await interaction.reply({ content: `You can't use the `clear` command. It is restricted to admins-only for now.`, ephemeral: false })
  }
}

Before I’ve tried to reply with an ephemeral response showing buttons labeled Yes/No asking if they really want to clear messages but I don’t know how to store the numbers so after pushing the button it would fail (and I lost the code since I didn’t commit that piece of code)

How can I make it so it could store the clear amount somewhere somehow that can’t be overwritten accidentally when someone else use the clear command somewhere else so after pushing the button then it will actually clear (since the function that handles button presses and the function that handles commands execution are 2 different funcs)

Any better idea than this is appreciated (btw im not a native English speaker so it might sounds weird here and there)