title: How to make author only click button
body: <p><strong>i want to make author only button if someone clicked and if this is not the author of the message, then the bot will send an error.but my code is not working</strong></p>
  <pre class="lang-py prettyprint-override"><code>@bot.command()
  async def button(ctx):
      await ctx.send(content=&quot;test&quot;, components=[Button(style=ButtonStyle.blue, label=&quot;Default Button&quot;, custom_id=&quot;button&quot;)])
      interaction = await bot.wait_for(&quot;button_click&quot;, check = lambda i: i.custom_id == &quot;button&quot;)
      if interaction.user == ctx.author:
       await ctx.send(&quot;successful test&quot;)
  </code></pre>