-
-
Notifications
You must be signed in to change notification settings - Fork 719
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 user-installable apps #2633
base: master
Are you sure you want to change the base?
Add support for user-installable apps #2633
Conversation
a55eba3
to
5bc36cb
Compare
8bb9df6
to
34bae66
Compare
7d78c12
to
f2d4e9d
Compare
d2d8463
to
a1a3954
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking quite good
src/main/java/net/dv8tion/jda/api/entities/channel/concrete/GroupChannel.java
Show resolved
Hide resolved
src/main/java/net/dv8tion/jda/internal/entities/ApplicationInfoImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/net/dv8tion/jda/internal/entities/ApplicationInfoImpl.java
Outdated
Show resolved
Hide resolved
...va/net/dv8tion/jda/internal/entities/channel/concrete/detached/DetachedStageChannelImpl.java
Show resolved
Hide resolved
src/main/java/net/dv8tion/jda/internal/entities/detached/DetachedMemberImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/net/dv8tion/jda/internal/entities/detached/DetachedMemberImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/net/dv8tion/jda/internal/entities/detached/DetachedRoleImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/net/dv8tion/jda/internal/entities/detached/DetachedRoleImpl.java
Outdated
Show resolved
Hide resolved
There seems to be a caching issue |
Contains common setters used in deserialization
It will be thrown by the detached member instead
Fixes the returned (cached) channel having the wrong user
c495b94
to
5488620
Compare
Should be fixed |
Discord fixed those
I am not sure if this is an issue on my code or the library it's not an issue on my client as it also occurs for other people |
As you mentioned, restarting the client fixes the issue, so it's not a JDA issue |
I really doubt it's not a JDA issue, it works in other discord frameworks sigh at this point I just give up, I have to resort to putting my image in an embed (by using the thing that annoys me the most is that it used to work, I don't know what changed nor do I know if it's something to do with your new changes |
Can't repro with the code below, please share minimal reproduction code if you can public void onSlashReplyEditAttachment(SlashCommandInteractionEvent event, Message.Attachment attachment, Message.Attachment attachment2) throws Exception {
final byte[] bytes = getBytes(attachment);
final byte[] bytes2 = getBytes(attachment2);
event.replyFiles(FileUpload.fromData(bytes, attachment.getFileName()))
.setEphemeral(true) // Tried without ephemeral too
.queue();
event.getHook()
.editOriginalAttachments(FileUpload.fromData(bytes2, attachment.getFileName()))
.queue();
}
private byte[] getBytes(Message.Attachment attachment) throws Exception {
try (InputStream stream = attachment.getProxy().download().get()) {
return stream.readAllBytes();
}
} |
Maybe a UserJoinEvent(like GuildJoinEvent for userapps) and a JDA.getInstalledAppUsers()(like JDA.getGuilds() for userapps) |
Discord doesn't have a way to get who installed the application on their accounts As a reminder, JDA adds what Discord documents, if it isn't in the Discord docs, we can't add it |
Pull Request Etiquette
Changes
Closes Issue: NaN
Description
This adds support for https://discord.com/developers/docs/change-log#userinstallable-apps-preview.
You are able to create application commands using the new properties, read the new data structures provided in
ApplicationInfo
,Interaction
andMessage
, as well as responding to interactions in detached guilds (where your bot isn't it in) and group DMs.