From 3f96a0e371aa4ad8baceb1e4b846ea7ca71088f3 Mon Sep 17 00:00:00 2001 From: Axel Joly Date: Fri, 19 Jul 2024 16:14:39 +0200 Subject: [PATCH] Update resolved data structure in application command interactions (#183) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Grégory Widmer --- .../discord4j/discordjson/json/ResolvedChannelData.java | 9 +++++++-- .../discord4j/discordjson/json/ResolvedMemberData.java | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/discord4j/discordjson/json/ResolvedChannelData.java b/src/main/java/discord4j/discordjson/json/ResolvedChannelData.java index 29b6cf5e..aeb006e1 100644 --- a/src/main/java/discord4j/discordjson/json/ResolvedChannelData.java +++ b/src/main/java/discord4j/discordjson/json/ResolvedChannelData.java @@ -2,8 +2,11 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import discord4j.discordjson.possible.Possible; import org.immutables.value.Value; +import java.util.Optional; + @Value.Immutable @JsonSerialize(as = ImmutableResolvedChannelData.class) @JsonDeserialize(as = ImmutableResolvedChannelData.class) @@ -15,10 +18,12 @@ static ImmutableResolvedChannelData.Builder builder() { String id(); - String name(); + // This field can be given in a resolved channel data object, but it has the same properties as the channel object + Possible> name(); int type(); - String permissions(); + // This field can be given in a resolved channel data object, but it has the same properties as the channel object + Possible> permissions(); } diff --git a/src/main/java/discord4j/discordjson/json/ResolvedMemberData.java b/src/main/java/discord4j/discordjson/json/ResolvedMemberData.java index 77ed42ee..7a9a0f55 100644 --- a/src/main/java/discord4j/discordjson/json/ResolvedMemberData.java +++ b/src/main/java/discord4j/discordjson/json/ResolvedMemberData.java @@ -20,6 +20,8 @@ static ImmutableResolvedMemberData.Builder builder() { Possible> nick(); + Possible> avatar(); + List roles(); @JsonProperty("joined_at")