From 97594ea2a2ccd61d9ab377e9334074b93204d3ef Mon Sep 17 00:00:00 2001 From: Michael Rittmeister Date: Mon, 26 Aug 2024 00:56:43 +0200 Subject: [PATCH] Fix Serialization of interactions --- common/api/common.api | 47 ++++++++++++-- common/api/common.klib.api | 62 +++++++++++++++---- .../commonMain/kotlin/entity/Interactions.kt | 5 +- 3 files changed, 96 insertions(+), 18 deletions(-) diff --git a/common/api/common.api b/common/api/common.api index f109f644eec..8e382735e92 100644 --- a/common/api/common.api +++ b/common/api/common.api @@ -2489,8 +2489,8 @@ public final class dev/kord/common/entity/DiscordAddedGuildMember$Companion { public final class dev/kord/common/entity/DiscordApplication : dev/kord/common/entity/BaseDiscordApplication { public static final field Companion Ldev/kord/common/entity/DiscordApplication$Companion; - public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/DiscordTeam;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;)V - public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/DiscordTeam;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/DiscordTeam;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;)V + public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/DiscordTeam;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/kord/common/entity/Snowflake; public final fun component10 ()Ldev/kord/common/entity/optional/Optional; public final fun component11 ()Ldev/kord/common/entity/optional/Optional; @@ -2503,11 +2503,13 @@ public final class dev/kord/common/entity/DiscordApplication : dev/kord/common/e public final fun component18 ()Ldev/kord/common/entity/optional/Optional; public final fun component19 ()Ldev/kord/common/entity/optional/Optional; public final fun component2 ()Ljava/lang/String; - public final fun component20 ()Ldev/kord/common/entity/optional/Optional; - public final fun component21 ()Ldev/kord/common/entity/optional/Optional; + public final fun component20 ()Ldev/kord/common/entity/optional/OptionalInt; + public final fun component21 ()Ldev/kord/common/entity/optional/OptionalInt; public final fun component22 ()Ldev/kord/common/entity/optional/Optional; public final fun component23 ()Ldev/kord/common/entity/optional/Optional; public final fun component24 ()Ldev/kord/common/entity/optional/Optional; + public final fun component25 ()Ldev/kord/common/entity/optional/Optional; + public final fun component26 ()Ldev/kord/common/entity/optional/Optional; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ljava/lang/String; public final fun component5 ()Ldev/kord/common/entity/optional/Optional; @@ -2515,9 +2517,11 @@ public final class dev/kord/common/entity/DiscordApplication : dev/kord/common/e public final fun component7 ()Z public final fun component8 ()Ldev/kord/common/entity/optional/Optional; public final fun component9 ()Ldev/kord/common/entity/optional/Optional; - public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/DiscordTeam;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;)Ldev/kord/common/entity/DiscordApplication; - public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordApplication;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/DiscordTeam;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordApplication; + public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/DiscordTeam;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;)Ldev/kord/common/entity/DiscordApplication; + public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordApplication;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/DiscordTeam;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordApplication; public fun equals (Ljava/lang/Object;)Z + public final fun getApproximateGuildCount ()Ldev/kord/common/entity/optional/OptionalInt; + public final fun getApproximateUserInstallCount ()Ldev/kord/common/entity/optional/OptionalInt; public final fun getBot ()Ldev/kord/common/entity/optional/Optional; public final fun getBotPublic ()Z public final fun getBotRequireCodeGrant ()Z @@ -4392,6 +4396,37 @@ public final class dev/kord/common/entity/DiscordInteraction$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class dev/kord/common/entity/DiscordInteraction$Guild { + public static final field Companion Ldev/kord/common/entity/DiscordInteraction$Guild$Companion; + public fun (Ldev/kord/common/Locale;Ldev/kord/common/entity/Snowflake;Ljava/util/List;)V + public final fun component1 ()Ldev/kord/common/Locale; + public final fun component2 ()Ldev/kord/common/entity/Snowflake; + public final fun component3 ()Ljava/util/List; + public final fun copy (Ldev/kord/common/Locale;Ldev/kord/common/entity/Snowflake;Ljava/util/List;)Ldev/kord/common/entity/DiscordInteraction$Guild; + public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordInteraction$Guild;Ldev/kord/common/Locale;Ldev/kord/common/entity/Snowflake;Ljava/util/List;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordInteraction$Guild; + public fun equals (Ljava/lang/Object;)Z + public final fun getFeatures ()Ljava/util/List; + public final fun getId ()Ldev/kord/common/entity/Snowflake; + public final fun getLocale ()Ldev/kord/common/Locale; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/kord/common/entity/DiscordInteraction$Guild$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/kord/common/entity/DiscordInteraction$Guild$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/kord/common/entity/DiscordInteraction$Guild; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/kord/common/entity/DiscordInteraction$Guild;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class dev/kord/common/entity/DiscordInteraction$Guild$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + public final class dev/kord/common/entity/DiscordInteractionGuildMember { public static final field Companion Ldev/kord/common/entity/DiscordInteractionGuildMember$Companion; public fun (Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/util/List;Lkotlinx/datetime/Instant;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/Permissions;Ldev/kord/common/entity/GuildMemberFlags;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;)V diff --git a/common/api/common.klib.api b/common/api/common.klib.api index 375ac4c9aeb..a96e50bcc33 100644 --- a/common/api/common.klib.api +++ b/common/api/common.klib.api @@ -938,8 +938,12 @@ final class dev.kord.common.entity/DiscordAddedGuildMember { // dev.kord.common. } final class dev.kord.common.entity/DiscordApplication : dev.kord.common.entity/BaseDiscordApplication { // dev.kord.common.entity/DiscordApplication|null[0] - constructor (dev.kord.common.entity/Snowflake, kotlin/String, kotlin/String?, kotlin/String, dev.kord.common.entity.optional/Optional> = ..., kotlin/Boolean, kotlin/Boolean, dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., kotlin/String, dev.kord.common.entity/DiscordTeam?, dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ...) // dev.kord.common.entity/DiscordApplication.|(dev.kord.common.entity.Snowflake;kotlin.String;kotlin.String?;kotlin.String;dev.kord.common.entity.optional.Optional>;kotlin.Boolean;kotlin.Boolean;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;kotlin.String;dev.kord.common.entity.DiscordTeam?;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional){}[0] + constructor (dev.kord.common.entity/Snowflake, kotlin/String, kotlin/String?, kotlin/String, dev.kord.common.entity.optional/Optional> = ..., kotlin/Boolean, kotlin/Boolean, dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., kotlin/String, dev.kord.common.entity/DiscordTeam?, dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/OptionalInt = ..., dev.kord.common.entity.optional/OptionalInt = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ...) // dev.kord.common.entity/DiscordApplication.|(dev.kord.common.entity.Snowflake;kotlin.String;kotlin.String?;kotlin.String;dev.kord.common.entity.optional.Optional>;kotlin.Boolean;kotlin.Boolean;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;kotlin.String;dev.kord.common.entity.DiscordTeam?;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.OptionalInt;dev.kord.common.entity.optional.OptionalInt;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional){}[0] + final val approximateGuildCount // dev.kord.common.entity/DiscordApplication.approximateGuildCount|{}approximateGuildCount[0] + final fun (): dev.kord.common.entity.optional/OptionalInt // dev.kord.common.entity/DiscordApplication.approximateGuildCount.|(){}[0] + final val approximateUserInstallCount // dev.kord.common.entity/DiscordApplication.approximateUserInstallCount|{}approximateUserInstallCount[0] + final fun (): dev.kord.common.entity.optional/OptionalInt // dev.kord.common.entity/DiscordApplication.approximateUserInstallCount.|(){}[0] final val bot // dev.kord.common.entity/DiscordApplication.bot|{}bot[0] final fun (): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordApplication.bot.|(){}[0] final val botPublic // dev.kord.common.entity/DiscordApplication.botPublic|{}botPublic[0] @@ -1001,11 +1005,13 @@ final class dev.kord.common.entity/DiscordApplication : dev.kord.common.entity/B final fun component18(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordApplication.component18|component18(){}[0] final fun component19(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordApplication.component19|component19(){}[0] final fun component2(): kotlin/String // dev.kord.common.entity/DiscordApplication.component2|component2(){}[0] - final fun component20(): dev.kord.common.entity.optional/Optional> // dev.kord.common.entity/DiscordApplication.component20|component20(){}[0] - final fun component21(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordApplication.component21|component21(){}[0] - final fun component22(): dev.kord.common.entity.optional/Optional> // dev.kord.common.entity/DiscordApplication.component22|component22(){}[0] - final fun component23(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordApplication.component23|component23(){}[0] - final fun component24(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordApplication.component24|component24(){}[0] + final fun component20(): dev.kord.common.entity.optional/OptionalInt // dev.kord.common.entity/DiscordApplication.component20|component20(){}[0] + final fun component21(): dev.kord.common.entity.optional/OptionalInt // dev.kord.common.entity/DiscordApplication.component21|component21(){}[0] + final fun component22(): dev.kord.common.entity.optional/Optional> // dev.kord.common.entity/DiscordApplication.component22|component22(){}[0] + final fun component23(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordApplication.component23|component23(){}[0] + final fun component24(): dev.kord.common.entity.optional/Optional> // dev.kord.common.entity/DiscordApplication.component24|component24(){}[0] + final fun component25(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordApplication.component25|component25(){}[0] + final fun component26(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordApplication.component26|component26(){}[0] final fun component3(): kotlin/String? // dev.kord.common.entity/DiscordApplication.component3|component3(){}[0] final fun component4(): kotlin/String // dev.kord.common.entity/DiscordApplication.component4|component4(){}[0] final fun component5(): dev.kord.common.entity.optional/Optional> // dev.kord.common.entity/DiscordApplication.component5|component5(){}[0] @@ -1013,7 +1019,7 @@ final class dev.kord.common.entity/DiscordApplication : dev.kord.common.entity/B final fun component7(): kotlin/Boolean // dev.kord.common.entity/DiscordApplication.component7|component7(){}[0] final fun component8(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordApplication.component8|component8(){}[0] final fun component9(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordApplication.component9|component9(){}[0] - final fun copy(dev.kord.common.entity/Snowflake = ..., kotlin/String = ..., kotlin/String? = ..., kotlin/String = ..., dev.kord.common.entity.optional/Optional> = ..., kotlin/Boolean = ..., kotlin/Boolean = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., kotlin/String = ..., dev.kord.common.entity/DiscordTeam? = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ...): dev.kord.common.entity/DiscordApplication // dev.kord.common.entity/DiscordApplication.copy|copy(dev.kord.common.entity.Snowflake;kotlin.String;kotlin.String?;kotlin.String;dev.kord.common.entity.optional.Optional>;kotlin.Boolean;kotlin.Boolean;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;kotlin.String;dev.kord.common.entity.DiscordTeam?;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional){}[0] + final fun copy(dev.kord.common.entity/Snowflake = ..., kotlin/String = ..., kotlin/String? = ..., kotlin/String = ..., dev.kord.common.entity.optional/Optional> = ..., kotlin/Boolean = ..., kotlin/Boolean = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., kotlin/String = ..., dev.kord.common.entity/DiscordTeam? = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/OptionalInt = ..., dev.kord.common.entity.optional/OptionalInt = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ...): dev.kord.common.entity/DiscordApplication // dev.kord.common.entity/DiscordApplication.copy|copy(dev.kord.common.entity.Snowflake;kotlin.String;kotlin.String?;kotlin.String;dev.kord.common.entity.optional.Optional>;kotlin.Boolean;kotlin.Boolean;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;kotlin.String;dev.kord.common.entity.DiscordTeam?;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.OptionalInt;dev.kord.common.entity.optional.OptionalInt;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional){}[0] final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.common.entity/DiscordApplication.equals|equals(kotlin.Any?){}[0] final fun hashCode(): kotlin/Int // dev.kord.common.entity/DiscordApplication.hashCode|hashCode(){}[0] final fun toString(): kotlin/String // dev.kord.common.entity/DiscordApplication.toString|toString(){}[0] @@ -3023,7 +3029,7 @@ final class dev.kord.common.entity/DiscordIntegrationsAccount { // dev.kord.comm } final class dev.kord.common.entity/DiscordInteraction { // dev.kord.common.entity/DiscordInteraction|null[0] - constructor (dev.kord.common.entity/Snowflake, dev.kord.common.entity/Snowflake, dev.kord.common.entity/InteractionType, dev.kord.common.entity/InteractionCallbackData, dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., kotlin/String, kotlin/Int, dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity/Permissions, dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., kotlin.collections/Map, dev.kord.common.entity.optional/Optional = ...) // dev.kord.common.entity/DiscordInteraction.|(dev.kord.common.entity.Snowflake;dev.kord.common.entity.Snowflake;dev.kord.common.entity.InteractionType;dev.kord.common.entity.InteractionCallbackData;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;kotlin.String;kotlin.Int;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.Permissions;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;kotlin.collections.Map;dev.kord.common.entity.optional.Optional){}[0] + constructor (dev.kord.common.entity/Snowflake, dev.kord.common.entity/Snowflake, dev.kord.common.entity/InteractionType, dev.kord.common.entity/InteractionCallbackData, dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., kotlin/String, kotlin/Int, dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity/Permissions, dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., kotlin.collections/Map, dev.kord.common.entity.optional/Optional = ...) // dev.kord.common.entity/DiscordInteraction.|(dev.kord.common.entity.Snowflake;dev.kord.common.entity.Snowflake;dev.kord.common.entity.InteractionType;dev.kord.common.entity.InteractionCallbackData;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;kotlin.String;kotlin.Int;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.Permissions;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;kotlin.collections.Map;dev.kord.common.entity.optional.Optional){}[0] final val appPermissions // dev.kord.common.entity/DiscordInteraction.appPermissions|{}appPermissions[0] final fun (): dev.kord.common.entity/Permissions // dev.kord.common.entity/DiscordInteraction.appPermissions.|(){}[0] @@ -3040,7 +3046,7 @@ final class dev.kord.common.entity/DiscordInteraction { // dev.kord.common.entit final val data // dev.kord.common.entity/DiscordInteraction.data|{}data[0] final fun (): dev.kord.common.entity/InteractionCallbackData // dev.kord.common.entity/DiscordInteraction.data.|(){}[0] final val guild // dev.kord.common.entity/DiscordInteraction.guild|{}guild[0] - final fun (): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordInteraction.guild.|(){}[0] + final fun (): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordInteraction.guild.|(){}[0] final val guildId // dev.kord.common.entity/DiscordInteraction.guildId|{}guildId[0] final fun (): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.common.entity/DiscordInteraction.guildId.|(){}[0] final val guildLocale // dev.kord.common.entity/DiscordInteraction.guildLocale|{}guildLocale[0] @@ -3076,15 +3082,49 @@ final class dev.kord.common.entity/DiscordInteraction { // dev.kord.common.entit final fun component3(): dev.kord.common.entity/InteractionType // dev.kord.common.entity/DiscordInteraction.component3|component3(){}[0] final fun component4(): dev.kord.common.entity/InteractionCallbackData // dev.kord.common.entity/DiscordInteraction.component4|component4(){}[0] final fun component5(): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.common.entity/DiscordInteraction.component5|component5(){}[0] - final fun component6(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordInteraction.component6|component6(){}[0] + final fun component6(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordInteraction.component6|component6(){}[0] final fun component7(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordInteraction.component7|component7(){}[0] final fun component8(): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.common.entity/DiscordInteraction.component8|component8(){}[0] final fun component9(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordInteraction.component9|component9(){}[0] - final fun copy(dev.kord.common.entity/Snowflake = ..., dev.kord.common.entity/Snowflake = ..., dev.kord.common.entity/InteractionType = ..., dev.kord.common.entity/InteractionCallbackData = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., kotlin/String = ..., kotlin/Int = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity/Permissions = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., kotlin.collections/Map = ..., dev.kord.common.entity.optional/Optional = ...): dev.kord.common.entity/DiscordInteraction // dev.kord.common.entity/DiscordInteraction.copy|copy(dev.kord.common.entity.Snowflake;dev.kord.common.entity.Snowflake;dev.kord.common.entity.InteractionType;dev.kord.common.entity.InteractionCallbackData;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;kotlin.String;kotlin.Int;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.Permissions;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;kotlin.collections.Map;dev.kord.common.entity.optional.Optional){}[0] + final fun copy(dev.kord.common.entity/Snowflake = ..., dev.kord.common.entity/Snowflake = ..., dev.kord.common.entity/InteractionType = ..., dev.kord.common.entity/InteractionCallbackData = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., kotlin/String = ..., kotlin/Int = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity/Permissions = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional = ..., kotlin.collections/Map = ..., dev.kord.common.entity.optional/Optional = ...): dev.kord.common.entity/DiscordInteraction // dev.kord.common.entity/DiscordInteraction.copy|copy(dev.kord.common.entity.Snowflake;dev.kord.common.entity.Snowflake;dev.kord.common.entity.InteractionType;dev.kord.common.entity.InteractionCallbackData;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;kotlin.String;kotlin.Int;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.Permissions;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional;kotlin.collections.Map;dev.kord.common.entity.optional.Optional){}[0] final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.common.entity/DiscordInteraction.equals|equals(kotlin.Any?){}[0] final fun hashCode(): kotlin/Int // dev.kord.common.entity/DiscordInteraction.hashCode|hashCode(){}[0] final fun toString(): kotlin/String // dev.kord.common.entity/DiscordInteraction.toString|toString(){}[0] + final class Guild { // dev.kord.common.entity/DiscordInteraction.Guild|null[0] + constructor (dev.kord.common/Locale, dev.kord.common.entity/Snowflake, kotlin.collections/List) // dev.kord.common.entity/DiscordInteraction.Guild.|(dev.kord.common.Locale;dev.kord.common.entity.Snowflake;kotlin.collections.List){}[0] + + final val features // dev.kord.common.entity/DiscordInteraction.Guild.features|{}features[0] + final fun (): kotlin.collections/List // dev.kord.common.entity/DiscordInteraction.Guild.features.|(){}[0] + final val id // dev.kord.common.entity/DiscordInteraction.Guild.id|{}id[0] + final fun (): dev.kord.common.entity/Snowflake // dev.kord.common.entity/DiscordInteraction.Guild.id.|(){}[0] + final val locale // dev.kord.common.entity/DiscordInteraction.Guild.locale|{}locale[0] + final fun (): dev.kord.common/Locale // dev.kord.common.entity/DiscordInteraction.Guild.locale.|(){}[0] + + final fun component1(): dev.kord.common/Locale // dev.kord.common.entity/DiscordInteraction.Guild.component1|component1(){}[0] + final fun component2(): dev.kord.common.entity/Snowflake // dev.kord.common.entity/DiscordInteraction.Guild.component2|component2(){}[0] + final fun component3(): kotlin.collections/List // dev.kord.common.entity/DiscordInteraction.Guild.component3|component3(){}[0] + final fun copy(dev.kord.common/Locale = ..., dev.kord.common.entity/Snowflake = ..., kotlin.collections/List = ...): dev.kord.common.entity/DiscordInteraction.Guild // dev.kord.common.entity/DiscordInteraction.Guild.copy|copy(dev.kord.common.Locale;dev.kord.common.entity.Snowflake;kotlin.collections.List){}[0] + final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.common.entity/DiscordInteraction.Guild.equals|equals(kotlin.Any?){}[0] + final fun hashCode(): kotlin/Int // dev.kord.common.entity/DiscordInteraction.Guild.hashCode|hashCode(){}[0] + final fun toString(): kotlin/String // dev.kord.common.entity/DiscordInteraction.Guild.toString|toString(){}[0] + + final object $serializer : kotlinx.serialization.internal/GeneratedSerializer { // dev.kord.common.entity/DiscordInteraction.Guild.$serializer|null[0] + final val descriptor // dev.kord.common.entity/DiscordInteraction.Guild.$serializer.descriptor|{}descriptor[0] + final fun (): kotlinx.serialization.descriptors/SerialDescriptor // dev.kord.common.entity/DiscordInteraction.Guild.$serializer.descriptor.|(){}[0] + + final fun childSerializers(): kotlin/Array> // dev.kord.common.entity/DiscordInteraction.Guild.$serializer.childSerializers|childSerializers(){}[0] + final fun deserialize(kotlinx.serialization.encoding/Decoder): dev.kord.common.entity/DiscordInteraction.Guild // dev.kord.common.entity/DiscordInteraction.Guild.$serializer.deserialize|deserialize(kotlinx.serialization.encoding.Decoder){}[0] + final fun serialize(kotlinx.serialization.encoding/Encoder, dev.kord.common.entity/DiscordInteraction.Guild) // dev.kord.common.entity/DiscordInteraction.Guild.$serializer.serialize|serialize(kotlinx.serialization.encoding.Encoder;dev.kord.common.entity.DiscordInteraction.Guild){}[0] + } + + final object Companion { // dev.kord.common.entity/DiscordInteraction.Guild.Companion|null[0] + final val $childSerializers // dev.kord.common.entity/DiscordInteraction.Guild.Companion.$childSerializers|{}$childSerializers[0] + + final fun serializer(): kotlinx.serialization/KSerializer // dev.kord.common.entity/DiscordInteraction.Guild.Companion.serializer|serializer(){}[0] + } + } + final object $serializer : kotlinx.serialization.internal/GeneratedSerializer { // dev.kord.common.entity/DiscordInteraction.$serializer|null[0] final val descriptor // dev.kord.common.entity/DiscordInteraction.$serializer.descriptor|{}descriptor[0] final fun (): kotlinx.serialization.descriptors/SerialDescriptor // dev.kord.common.entity/DiscordInteraction.$serializer.descriptor.|(){}[0] diff --git a/common/src/commonMain/kotlin/entity/Interactions.kt b/common/src/commonMain/kotlin/entity/Interactions.kt index ef4e1e4be13..634cd508adb 100644 --- a/common/src/commonMain/kotlin/entity/Interactions.kt +++ b/common/src/commonMain/kotlin/entity/Interactions.kt @@ -266,7 +266,7 @@ public data class DiscordInteraction( val data: InteractionCallbackData, @SerialName("guild_id") val guildId: OptionalSnowflake = OptionalSnowflake.Missing, - val guild: Optional = Optional.Missing(), + val guild: Optional = Optional.Missing(), val channel: Optional = Optional.Missing(), @SerialName("channel_id") val channelId: OptionalSnowflake = OptionalSnowflake.Missing, @@ -286,6 +286,9 @@ public data class DiscordInteraction( val context: Optional = Optional.Missing() ) { + @Serializable + public data class Guild(val locale: Locale, val id: Snowflake, val features: List) + /** * Serializer that handles incomplete messages in [DiscordInteraction.message]. Discards * any incomplete messages as missing optionals.