Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@danielmillar
Copy link
Contributor

This PR brings the project in line with JDA V6.0.0-rc.1 by updating usages of deprecated methods introduced in the release candidate.

  • Replaced setGuild(boolean) with setContexts(InteractionContextType.GUILD)
  • Updated editCommandById(id) to editCommandById(type, id)

Compatibility Notice

These changes are not backward compatible with JDA v5.x.x, as they rely on methods introduced in JDA v6.0.0-rc.1 or later.
Since v6 is still in RC, there might be more breaking changes before the final release. I would hold off on merging this until v6 is stable to avoid future conflicts.

@danielmillar danielmillar changed the title Migrate to JDA v6.0.0-rc.1 Migrate to JDA v6.0.0 Aug 4, 2025
@Revxrsal
Copy link
Owner

Revxrsal commented Aug 5, 2025

Could we use reflections in the meantime? This would make it easier to support both versions simultaneously.

@danielmillar
Copy link
Contributor Author

After reviewing both JDA v5.X.X and v6.0.0, this PR is backwards compatible. The method setContexts(InteractionContextType.GUILD) is available in v5.6.1 and provides the same functionality, JDA has simply deprecated the redundant setGuildOnly method.

Similarly, editCommandById(type, id) is present in both versions, so there are no compatibility concerns there either.

@danielmillar danielmillar marked this pull request as ready for review August 5, 2025 10:02
@danielmillar
Copy link
Contributor Author

I've added 3 new methods to SlashCommandActor which allow users to reply to interactions using components. Without these users would have to get the commandEvent() first and then use replyComponents() within. These new methods simplify that process and provide a more convenient, consistent API alongside the existing reply methods.

Let me know if there is any issues with this.

@Revxrsal Revxrsal merged commit 480d535 into Revxrsal:v4 Sep 8, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants