diff --git a/src/main/java/discord4j/discordjson/json/ResolvedChannelData.java b/src/main/java/discord4j/discordjson/json/ResolvedChannelData.java index 29b6cf5e..dee62d01 100644 --- a/src/main/java/discord4j/discordjson/json/ResolvedChannelData.java +++ b/src/main/java/discord4j/discordjson/json/ResolvedChannelData.java @@ -1,9 +1,14 @@ package discord4j.discordjson.json; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import discord4j.discordjson.Id; +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 +20,21 @@ 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(); + + // Only provided if channel is a thread + @JsonProperty("thread_metadata") + Possible threadMetadata(); + + // Only provided if channel is a thread + + @JsonProperty("parent_id") + Possible parentId(); } diff --git a/src/main/java/discord4j/discordjson/json/ResolvedMemberData.java b/src/main/java/discord4j/discordjson/json/ResolvedMemberData.java index 4c53cd1f..ca91e2dd 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")