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

Add support for application command auto complete #1033

Merged
merged 5 commits into from
Nov 7, 2021

Conversation

NovaFox161
Copy link
Sponsor Member

Description:
This PR adds support for the new APPLICATION_COMMAND_AUTOCOMPLETE interaction type.

Due to the fact that it only allows 1 response method and cannot be deferred, I had to change the interaction hierarchy once again.

D4J Interaction Hierarchy drawio

This hierarchy change shouldn't require special migration steps unless developers are listening directly to the InteractionCreateEvent rather than a specialized event for the specific interaction type.

The AutoCompleteInteractionEvent is a placeholder event currently as discord does have plans to add more types of auto complete. However, it is currently unknown how they will be structured (sub-typed like application commands or each a different type of interaction completely).

Since all interaction classes are marked as experimental, I have targeted 3.2 with this change.

Justification:

@NovaFox161 NovaFox161 added enhancement Improvement over an existing feature area/core Related to core module: events, entities, clients, specs API change Breaks public API in x.y releases, needs migration docs behavior change Please include migration notes experimental Warning about Experimental/Beta changes to x.y.z releases area/interactions Related to Discord Interactions feature labels Oct 29, 2021
@NovaFox161 NovaFox161 added this to the 3.2.1 milestone Oct 29, 2021
@NovaFox161 NovaFox161 linked an issue Oct 29, 2021 that may be closed by this pull request
# Conflicts:
#	core/src/main/java/discord4j/core/object/command/ApplicationCommandOption.java
@quanticc quanticc removed the behavior change Please include migration notes label Nov 6, 2021
@quanticc quanticc merged commit 4cedc8e into 3.2.x Nov 7, 2021
@quanticc quanticc deleted the feature/autocomplete branch November 7, 2021 15:04
quanticc added a commit that referenced this pull request Nov 7, 2021
LociStar added a commit to LociStar/Organizer that referenced this pull request Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API change Breaks public API in x.y releases, needs migration docs area/core Related to core module: events, entities, clients, specs area/interactions Related to Discord Interactions feature enhancement Improvement over an existing feature experimental Warning about Experimental/Beta changes to x.y.z releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Auto Complete for Application Commands
3 participants