Skip to content

Commit

Permalink
Support Message forwarding data
Browse files Browse the repository at this point in the history
  • Loading branch information
Doc94 committed Aug 8, 2024
1 parent 2bb64f7 commit 60d8f28
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ static ImmutableMessageCreateRequest.Builder builder() {

@Deprecated
Possible<EmbedData> embed();

@JsonProperty("message_reference")
Possible<MessageReferenceData> messageReference();
}
3 changes: 3 additions & 0 deletions src/main/java/discord4j/discordjson/json/MessageData.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ static ImmutableMessageData.Builder builder() {
@JsonProperty("message_reference")
Possible<MessageReferenceData> messageReference();

@JsonProperty("message_snapshots")
Possible<List<MessageSnapshotsData>> messageSnapshots();

Possible<Integer> flags();

@Deprecated
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/discord4j/discordjson/json/MessageSnapshotsData.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package discord4j.discordjson.json;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.immutables.value.Value;

@Value.Immutable
@JsonSerialize(as = ImmutableMessageSnapshotsData.class)
@JsonDeserialize(as = ImmutableMessageSnapshotsData.class)
public interface MessageSnapshotsData {

static ImmutableMessageSnapshotsData.Builder builder() {
return ImmutableMessageSnapshotsData.builder();
}

PartialMessageData message();

}

0 comments on commit 60d8f28

Please sign in to comment.