title: Adding a cooldown to a button (Pycord 2.0.0b4)
body: <p>I'm working on a Discord bot using Pycord 2.0.0b4 and am trying to implement buttons with a 3 second cooldown per user.</p>
  <p>I want the bot to send a cooldown message if someone tries clicking the button during the cooldown (e.g. try again in x seconds), or respond with the embed <code>embed1</code> otherwise.</p>
  <p>Here's what I'm working with:</p>
  <pre><code>class yeetView(discord.ui.View):
  
    @discord.ui.button(label='Yeet Again', style=discord.ButtonStyle.primary, emoji='')
    async def button_callback(self, button, interaction):
      embed1 = await reYeetAlgo(interaction, interaction.user.id)
      await interaction.response.send_message(embed=embed1, view=yeetView())
  
  # Button click awaits some other async function reYeetAlgo, which returns Embed object embed1, which is then sent on Discord as an embed along with another button to run the function again if the user so chooses.
  </code></pre>
  <p>I have cooldowns on other commands with a similar cooldown time using <code>@commands.cooldown(1, 3, commands.BucketType.user)</code>, but the decorator only works because they are commands. So I'm looking for something that applies the same thing but to buttons/interactions. Thanks</p>