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

Message Rework #2187

Merged
merged 85 commits into from
Aug 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
5051ea4
Split send and edit requests
MinnDevelopment Jul 22, 2022
88c49aa
Add builder abstraction
MinnDevelopment Jul 22, 2022
fd72e13
Add new mixin interfaces
MinnDevelopment Jul 22, 2022
87a3638
Update code for interaction replies
MinnDevelopment Jul 22, 2022
27c7138
Update webhook actions
MinnDevelopment Jul 22, 2022
f4be70a
Fix some compiler issues
MinnDevelopment Jul 22, 2022
647933a
Improve consistency with rest actions
MinnDevelopment Jul 23, 2022
8fff536
Add more conversion methods
MinnDevelopment Jul 23, 2022
b86c56d
Add support for file descriptions
MinnDevelopment Jul 23, 2022
bf2e91a
Varargs factories
MinnDevelopment Jul 23, 2022
73d934d
Replace file sending methods with FileUpload variants
MinnDevelopment Jul 23, 2022
e6509fd
Fix docs issues by removing docs
MinnDevelopment Jul 23, 2022
e2f2063
Delete MessageAction and MessageBuilder
MinnDevelopment Jul 23, 2022
c2801ce
Remove some old comments
MinnDevelopment Jul 23, 2022
fb2fe70
Rename setter
MinnDevelopment Jul 23, 2022
7a945dc
Improve checks
MinnDevelopment Jul 23, 2022
b0d9030
Delete AttachmentOption
MinnDevelopment Jul 23, 2022
76b2af0
Add some getters
MinnDevelopment Jul 23, 2022
a0f7a2f
Add FluentRestAction abstraction
MinnDevelopment Jul 23, 2022
9d22172
Make max description length a constant
MinnDevelopment Jul 23, 2022
acad294
Implement finalize in BufferedRequestBody
MinnDevelopment Jul 23, 2022
4842d4a
Add some docs to MessageRequest and MessageEditRequest
MinnDevelopment Jul 24, 2022
55e9926
Add docs for MessageCreateRequest
MinnDevelopment Jul 24, 2022
146b903
Fix copy-paste error
MinnDevelopment Jul 24, 2022
67da470
Add builder documentation
MinnDevelopment Jul 24, 2022
e5ea237
Add docs for data classes
MinnDevelopment Jul 24, 2022
5474a01
Add more docs
MinnDevelopment Jul 24, 2022
ce3388a
Add missing docs for Message
MinnDevelopment Jul 24, 2022
9663f48
Delete DataMessage and add Message#editMessageAttachments
MinnDevelopment Jul 24, 2022
1f69e75
Add SplitUtil
MinnDevelopment Jul 24, 2022
3a51c34
Use lastIndexOf
MinnDevelopment Jul 24, 2022
db07102
Iterate backwards in onChar
MinnDevelopment Jul 24, 2022
b691ff2
Fix issue with success callbacks on MessageCreate/EditAction
MinnDevelopment Jul 24, 2022
df09c72
Fix some accumulative methods not being accumulative
MinnDevelopment Jul 24, 2022
b73e9e4
Fix typo
MinnDevelopment Jul 24, 2022
58dc5e0
Fix ephemeral deferReply
MinnDevelopment Jul 24, 2022
41b769c
Improve docs for AllowedMentions
MinnDevelopment Jul 25, 2022
bc379ea
Add MessageCreateRequest#setSuppressEmbeds
MinnDevelopment Jul 25, 2022
ff9b1d9
Downgrade gateway api to version 9 until deadline
MinnDevelopment Jul 26, 2022
42c2fd1
Remove ReceivedMessage#withHook
MinnDevelopment Jul 26, 2022
44000bf
Add Message#getComponents
MinnDevelopment Jul 26, 2022
19f27d8
Make getButtons use getComponents
MinnDevelopment Jul 26, 2022
e71933e
Fix files on webhook message action and rename sendFile to sendFiles
MinnDevelopment Jul 31, 2022
bab21fd
Use try-with-resources
MinnDevelopment Jul 31, 2022
9e9c97f
Improve handling of FileUpload#close
MinnDevelopment Jul 31, 2022
e12fac6
Fix check
MinnDevelopment Jul 31, 2022
ca93e60
Add Request#cleanup to handle cancelled request cleanup
MinnDevelopment Jul 31, 2022
03d142d
Make close synchronized
MinnDevelopment Jul 31, 2022
d04df7c
Add missing docs
MinnDevelopment Jul 31, 2022
9a51f77
Add back some missing context in the docs
MinnDevelopment Jul 31, 2022
b26b777
Rename WebhookMessageAction to WebhookMessageCreateAction
MinnDevelopment Jul 31, 2022
c2b9b1e
Rename to assPoiler
MinnDevelopment Jul 31, 2022
7d76105
Add FileUpload#setName
MinnDevelopment Jul 31, 2022
020390a
Update src/main/java/net/dv8tion/jda/api/entities/Message.java
MinnDevelopment Jul 31, 2022
5706623
Update src/main/java/net/dv8tion/jda/api/entities/Message.java
MinnDevelopment Jul 31, 2022
08a63ba
Use isSet for applying edit data
MinnDevelopment Jul 31, 2022
8bd2184
Use constants for list initialization
MinnDevelopment Jul 31, 2022
1fd3f10
Use flag enum where appropriate
MinnDevelopment Jul 31, 2022
952decf
Add examples to SplitUtil
MinnDevelopment Jul 31, 2022
f720ba6
Add more docs for MessageCreateBuilder
MinnDevelopment Jul 31, 2022
7bb7c5c
Add note about mentions
MinnDevelopment Jul 31, 2022
269abfb
Make MessageEditBuilder#applyData accumulative
MinnDevelopment Aug 1, 2022
9f86bd6
Add check for app flags for message content
MinnDevelopment Aug 1, 2022
2a2e83b
Update note for resource handling
MinnDevelopment Aug 6, 2022
80be3a7
Rename replace(...) to setReplace(...)
MinnDevelopment Aug 6, 2022
e46d187
Allow suppressing embeds on edits too
MinnDevelopment Aug 6, 2022
bb048a7
Make max nonce length a constant
MinnDevelopment Aug 6, 2022
00bab0e
Make example for varargs
MinnDevelopment Aug 6, 2022
c252302
Rework allowed mentions and add MessageData interface
MinnDevelopment Aug 6, 2022
50a30ad
Merge remote-tracking branch 'origin/master' into feature/message-rework
MinnDevelopment Aug 10, 2022
f219d9b
Use flag enum
MinnDevelopment Aug 10, 2022
f685927
Remove flags check
MinnDevelopment Aug 13, 2022
406ce05
Pass payload json into createMultipartBody for webhook messages
MinnDevelopment Aug 13, 2022
851d75a
Improve consistency for multipart body requests
MinnDevelopment Aug 13, 2022
f9a102c
Remove unused data array
MinnDevelopment Aug 13, 2022
4aaf5cb
Use collections for mentions
MinnDevelopment Aug 13, 2022
68d4729
Cleanup usage of mentions and generic bounds
MinnDevelopment Aug 13, 2022
d348eab
Fix example
MinnDevelopment Aug 13, 2022
8d80b19
Add new examples
MinnDevelopment Aug 13, 2022
f823e79
Fix return type
MinnDevelopment Aug 13, 2022
4ae9376
Change the type check for mentions to UserSnowflake
MinnDevelopment Aug 13, 2022
95a1f70
Update docs for clear() and closeFiles()
MinnDevelopment Aug 13, 2022
c838479
Rename set and flags for clarity
MinnDevelopment Aug 13, 2022
4da7c59
Fix comment in docs
MinnDevelopment Aug 13, 2022
c24c591
Fix annotations
MinnDevelopment Aug 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/main/java/net/dv8tion/jda/api/EmbedBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ public EmbedBuilder setColor(int color)
*
* <p><b>Uploading images with Embeds</b>
* <br>When uploading an <u>image</u>
* (using {@link net.dv8tion.jda.api.entities.MessageChannel#sendFile(java.io.File, net.dv8tion.jda.api.utils.AttachmentOption...) MessageChannel.sendFile(...)})
* (using {@link net.dv8tion.jda.api.entities.MessageChannel#sendFiles(net.dv8tion.jda.api.utils.FileUpload...) MessageChannel.sendFiles(...)})
* you can reference said image using the specified filename as URI {@code attachment://filename.ext}.
*
* <p><u>Example</u>
Expand All @@ -442,7 +442,7 @@ public EmbedBuilder setColor(int color)
* InputStream file = new URL("https://http.cat/500").openStream();
* embed.setThumbnail("attachment://cat.png") // we specify this in sendFile as "cat.png"
* .setDescription("This is a cute cat :3");
* channel.sendFile(file, "cat.png").setEmbeds(embed.build()).queue();
* channel.sendFiles(FileUpload.fromData(file, "cat.png")).setEmbeds(embed.build()).queue();
* </code></pre>
*
* @param url
Expand Down Expand Up @@ -479,7 +479,7 @@ public EmbedBuilder setThumbnail(@Nullable String url)
*
* <p><b>Uploading images with Embeds</b>
* <br>When uploading an <u>image</u>
* (using {@link net.dv8tion.jda.api.entities.MessageChannel#sendFile(java.io.File, net.dv8tion.jda.api.utils.AttachmentOption...) MessageChannel.sendFile(...)})
* (using {@link net.dv8tion.jda.api.entities.MessageChannel#sendFiles(net.dv8tion.jda.api.utils.FileUpload...) MessageChannel.sendFiles(...)})
* you can reference said image using the specified filename as URI {@code attachment://filename.ext}.
*
* <p><u>Example</u>
Expand All @@ -489,7 +489,7 @@ public EmbedBuilder setThumbnail(@Nullable String url)
* InputStream file = new URL("https://http.cat/500").openStream();
* embed.setImage("attachment://cat.png") // we specify this in sendFile as "cat.png"
* .setDescription("This is a cute cat :3");
* channel.sendFile(file, "cat.png").setEmbeds(embed.build()).queue();
* channel.sendFiles(FileUpload.fromData(file, "cat.png")).setEmbeds(embed.build()).queue();
* </code></pre>
*
* @param url
Expand All @@ -504,7 +504,7 @@ public EmbedBuilder setThumbnail(@Nullable String url)
*
* @return the builder after the image has been set
*
* @see net.dv8tion.jda.api.entities.MessageChannel#sendFile(java.io.File, String, net.dv8tion.jda.api.utils.AttachmentOption...) MessageChannel.sendFile(...)
* @see net.dv8tion.jda.api.entities.MessageChannel#sendFiles(net.dv8tion.jda.api.utils.FileUpload...) MessageChannel.sendFiles(...)
*/
@Nonnull
public EmbedBuilder setImage(@Nullable String url)
Expand Down Expand Up @@ -580,7 +580,7 @@ public EmbedBuilder setAuthor(@Nullable String name, @Nullable String url)
*
* <p><b>Uploading images with Embeds</b>
* <br>When uploading an <u>image</u>
* (using {@link net.dv8tion.jda.api.entities.MessageChannel#sendFile(java.io.File, net.dv8tion.jda.api.utils.AttachmentOption...) MessageChannel.sendFile(...)})
* (using {@link net.dv8tion.jda.api.entities.MessageChannel#sendFiles(net.dv8tion.jda.api.utils.FileUpload...) MessageChannel.sendFiles(...)})
* you can reference said image using the specified filename as URI {@code attachment://filename.ext}.
*
* <p><u>Example</u>
Expand All @@ -590,7 +590,7 @@ public EmbedBuilder setAuthor(@Nullable String name, @Nullable String url)
* InputStream file = new URL("https://http.cat/500").openStream();
* embed.setAuthor("Minn", null, "attachment://cat.png") // we specify this in sendFile as "cat.png"
* .setDescription("This is a cute cat :3");
* channel.sendFile(file, "cat.png").setEmbeds(embed.build()).queue();
* channel.sendFiles(FileUpload.fromData(file, "cat.png")).setEmbeds(embed.build()).queue();
* </code></pre>
*
* @param name
Expand Down Expand Up @@ -660,7 +660,7 @@ public EmbedBuilder setFooter(@Nullable String text)
*
* <p><b>Uploading images with Embeds</b>
* <br>When uploading an <u>image</u>
* (using {@link net.dv8tion.jda.api.entities.MessageChannel#sendFile(java.io.File, net.dv8tion.jda.api.utils.AttachmentOption...) MessageChannel.sendFile(...)})
* (using {@link net.dv8tion.jda.api.entities.MessageChannel#sendFiles(net.dv8tion.jda.api.utils.FileUpload...) MessageChannel.sendFiles(...)})
* you can reference said image using the specified filename as URI {@code attachment://filename.ext}.
*
* <p><u>Example</u>
Expand All @@ -670,7 +670,7 @@ public EmbedBuilder setFooter(@Nullable String text)
* InputStream file = new URL("https://http.cat/500").openStream();
* embed.setFooter("Cool footer!", "attachment://cat.png") // we specify this in sendFile as "cat.png"
* .setDescription("This is a cute cat :3");
* channel.sendFile(file, "cat.png").setEmbeds(embed.build()).queue();
* channel.sendFiles(FileUpload.fromData(file, "cat.png")).setEmbeds(embed.build()).queue();
* </code></pre>
*
* @param text
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/dv8tion/jda/api/JDAInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
public class JDAInfo
{
public static final int DISCORD_GATEWAY_VERSION = 10;
public static final int DISCORD_GATEWAY_VERSION = 9;
MinnDevelopment marked this conversation as resolved.
Show resolved Hide resolved
public static final int DISCORD_REST_VERSION = 10;
public static final int AUDIO_GATEWAY_VERSION = 4;
public static final String GITHUB = "https://github.com/DV8FromTheWorld/JDA";
Expand Down
Loading