Discord.py Disable Button / Freeze Button in embed

Viewed 2821

enter image description here
I'm trying to make a replica of this bot, in which when I press any of the buttons below, it shows a dropdown menu, and you can only use the dropdown menu, rest of all the buttons are frozen or disabled, but I have not idea have to do that , I have searched on google for this but nothing helped

enter image description here

here is the code that I have been trying

      Button(
          style=ButtonStyle.gray ,
          label="Add Req.",
          custom_id="add_req",
          emoji='➕'),
      Button(
          style=ButtonStyle.gray,
          label="Add Mult.",
          custom_id="add_mult",
          emoji='➕'))

  columns_of_buttons = ActionRow(
      Button(
          style = ButtonStyle.gray,
          label= "Remove Item",
          custom_id="remove_item",
          emoji='➖'),
      Button(  
          style = ButtonStyle.gray,
          label= "Start",
          custom_id="start",
          emoji='➡'))

  msg = await ctx.send(embed = embed ,components= [row_of_buttons , columns_of_buttons])
  on_click = msg.create_click_listener(timeout=60)
  @on_click.matching_id("add_req")
  async def add_req(ctx):
      embed.clear_fields()
      emb = discord.Embed(title = 'Add new Requirement' , description = '**Choose a requirement type**')
      await msg.edit(embed = emb , components=[])
        ```

**EDIT**

I successfully did it by doing this

    ActionRow.disable_buttons(row_of_buttons)
    ActionRow.disable_buttons(columns_of_buttons)

1 Answers
Related