Hello how can i add a button into this row ?
rows = ActionRow.rows_from_message(message)
for row, component in ActionRow.walk_components(rows):
if component.options[0].value == "0":
component.options.remove(component.options[0])
if component.custom_id == "multiple_roles" and component.max_values > 1:
component.max_values -= 1
try:
component.append_option(disnake.SelectOption(label=role.name, value=role.id, description=description, emoji=emoji))
except ValueError:
await inter.followup.send("Le nombre max a été atteint !")
return
else:
if component.custom_id == "multiple_roles":
component.max_values += 1
button = Button(style=disnake.ButtonStyle.secondary, label="❌", custom_id="remove_role")
await message.edit(components=rows)
I've already made the button but i can't add it to the row because there is too many components into it.