Skip to content

Commit

Permalink
Update resolved data structure in application command interactions (#183
Browse files Browse the repository at this point in the history
)



Co-authored-by: Grégory Widmer <[email protected]>
  • Loading branch information
Azn9 and Gregory-Widmer authored Jul 19, 2024
1 parent 7f2c166 commit 3f96a0e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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<Optional<String>> 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<Optional<String>> permissions();

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ static ImmutableResolvedMemberData.Builder builder() {

Possible<Optional<String>> nick();

Possible<Optional<String>> avatar();

List<String> roles();

@JsonProperty("joined_at")
Expand Down

0 comments on commit 3f96a0e

Please sign in to comment.