Skip to content

Conversation

@freya022
Copy link
Contributor

@freya022 freya022 commented Oct 14, 2024

Pull Request Etiquette

Changes

  • Internal code
  • Library interface (affecting end-user code)
  • Documentation
  • Other: _____

Closes Issue: NaN

Description

Adds basic support for activities:

  • Creating/reading entry point commands (PrimaryEntryPointCommandData)
  • Receiving/responding to entry point interactions (PrimaryEntryPointInteractionEvent)
  • Reading the activity instance (InteractionCallbackResponse#getActivityInstance() from InteractionHook#getCallbackResponse()) created by ILaunchActivityCallback#replyLaunchActivity()
  • Retrieving an activity instance by ID (JDA#retrieveActivityInstanceById(String))

@freya022 freya022 marked this pull request as ready for review October 18, 2024 20:36
Copy link
Member

@DV8FromTheWorld DV8FromTheWorld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. Dropped a number of comments, but many are duplicates so when a decision is reached all the code is updated.

I think we should consider moving to "PrimaryEntrypointCommand" for a measure of consistency and code-self-explanation.

@Nonnull
@CheckReturnValue
CommandListUpdateAction updateCommands();
GlobalCommandListUpdateAction updateCommands();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does renaming this break ABI? I haven't read further here, but this strikes me a possible problem

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe yes, as the method signatures in the bytecode include the parameters and return type signatures

@freya022 freya022 force-pushed the feature/activities branch from e3f8b06 to 20aa434 Compare August 6, 2025 15:44
@freya022
Copy link
Contributor Author

freya022 commented Aug 6, 2025

I think we should consider moving to "PrimaryEntrypointCommand" for a measure of consistency and code-self-explanation.

Slash command properties are also merged into Command, so I put the entrypoint stuff in it too, having a separate PrimaryEntrypointCommand subtype would require the user to check if it is an instance of such, while for slash commands it isn't needed at this moment. Are you sure you want to go with it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants