-
-
Notifications
You must be signed in to change notification settings - Fork 718
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
Handle messages from inaccessible threads and add webhook support #2390
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MinnDevelopment
added
type: enhancement
type: semi-breaking
this might change internals in a non-comptible way
labels
Feb 2, 2023
…essages # Conflicts: # src/main/java/net/dv8tion/jda/internal/entities/EntityBuilder.java # src/main/java/net/dv8tion/jda/internal/entities/ReceivedMessage.java # src/main/java/net/dv8tion/jda/internal/entities/SystemMessage.java # src/main/java/net/dv8tion/jda/internal/handle/InteractionCreateHandler.java # src/main/java/net/dv8tion/jda/internal/interactions/InteractionHookImpl.java
MinnDevelopment
changed the title
Interactions in uncached threads
Handle messages from unknown sources
May 20, 2023
MinnDevelopment
changed the title
Handle messages from unknown sources
Handle messages from uncached sources
May 20, 2023
Vankka
reviewed
Jun 16, 2023
MinnDevelopment
added
the
beta-blocker
Should be merged before dropping beta classification
label
Jun 30, 2023
MinnDevelopment
commented
Sep 26, 2023
src/main/java/net/dv8tion/jda/api/interactions/Interaction.java
Outdated
Show resolved
Hide resolved
src/main/java/net/dv8tion/jda/api/requests/restaction/AbstractWebhookMessageAction.java
Show resolved
Hide resolved
src/main/java/net/dv8tion/jda/api/requests/restaction/ThreadCreateMetadata.java
Show resolved
Hide resolved
src/main/java/net/dv8tion/jda/internal/interactions/InteractionHookImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/net/dv8tion/jda/internal/interactions/component/ComponentInteractionImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/net/dv8tion/jda/internal/requests/restaction/MessageEditActionImpl.java
Outdated
Show resolved
Hide resolved
…essages # Conflicts: # src/main/java/net/dv8tion/jda/api/entities/channel/ChannelType.java
MinnDevelopment
changed the title
Handle messages from uncached sources
Handle messages from inaccessible threads and add webhook support
Oct 15, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
beta-blocker
Should be merged before dropping beta classification
type: enhancement
type: semi-breaking
this might change internals in a non-comptible way
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Etiquette
Changes
Closes Issue: NaN
Description
Adds support for sending webhook messages and handle interactions from hidden threads.
Summary
WebhookClient.createClient(jda, url)
, which allows sending webhook messagesInteractionHook.from(jda, interactionToken)
, which allows sending followup messages for interactionsMessage
to be usable without a channel or guild. This is necessary for WebhookClient and InteractionHook, where the channel is potentially not reachable by the bot.Message#hasChannel
andMessage#hasGuild
to check whether a channel or guild is provided by the message instanceMessageReaction
accordinglychannel
objectsSystemMessage
in favor of simple checks inReceivedMessage
EntityBuilder
now has new methods for creating messages in webhooks:createMessageFromWebhook
creates a message instance without a channel, but potentially a guild instancecreateMessageBestEffort
creates a message instance based on the provided channel and guild (or null in case of not being accessible)