Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When I disable a Actionrow with buttons only disable first button #2547

Closed
3 tasks done
gabrizete opened this issue Sep 24, 2023 · 3 comments
Closed
3 tasks done

When I disable a Actionrow with buttons only disable first button #2547

gabrizete opened this issue Sep 24, 2023 · 3 comments

Comments

@gabrizete
Copy link

General Troubleshooting

  • I have checked for similar issues on the Issue-tracker.
  • I have updated to the latest JDA version
  • I have checked the branches or the maintainers' PRs for upcoming bug fixes.

Expected Behaviour

I have two buttons on a embed messge and when I click on first button disables only first button and when I click on second button disables both. The expected behavior is disable both button no matter what button you click.

Code Example for Reproduction Steps

@Override
    public void onButtonInteraction(ButtonInteractionEvent event) {
        ...
        event.editComponents(ActionRow.of(
                Button.of(ButtonStyle.SUCCESS, "authenticator_accepted", "Accept").asDisabled(),
                Button.of(ButtonStyle.DANGER, "authenticator_its_not_me", "It's not me!").asDisabled()
        )).queue();
    }

Code for JDABuilder or DefaultShardManagerBuilder used

JDABuilder.createLight(ENV.get("TOKEN"),
                GatewayIntent.MESSAGE_CONTENT,
                GatewayIntent.GUILD_PRESENCES,
                GatewayIntent.GUILD_MEMBERS)
                .setStatus(OnlineStatus.ONLINE)
                .addEventListeners(new InteractionExecutor(commandExecutors, modalExecutors))
                .addEventListeners(requestPlayerForAuthentication)
                .build().awaitReady();

Exception or Error

No response

@MinnDevelopment
Copy link
Member

I cannot reproduce any issue with your provided code sample. Can you provide a minimally reproducible example?

@gabrizete
Copy link
Author

I will create a repository with the project without the database and redis to make it easier and I will send the link here. Thank you for your attention!

@gabrizete
Copy link
Author

Sorry, trying to reproduce the problem discovered my error. basically the event had already been sent a response but I managed to do it in a way that didn't trigger an exception (I don't know how I did that) it only triggered the exception when I clicked on the undisabled button again so I thought it was a bug. Sorry again and thanks for your attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants