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
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)
You can use:
from discord_components import Button
Button(style = ButtonStyle.gray,
label= "Remove Item",
custom_id="remove_item",
emoji='➖',
disabled = True)
Read this: https://discord-components.readthedocs.io/en/0.5.2.4/pages/button.html?highlight=button%20disable#discord_components.button.Button.disabled
discord_components.Button() has an argument: disabled : bool = False
.