diff --git a/common/api/common.api b/common/api/common.api index fb87a200c9dd..7a57259210ae 100644 --- a/common/api/common.api +++ b/common/api/common.api @@ -263,6 +263,56 @@ public final class dev/kord/common/entity/ActivityFlags$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public abstract class dev/kord/common/entity/ActivityPlatform { + public static final field Companion Ldev/kord/common/entity/ActivityPlatform$Companion; + public synthetic fun (Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun equals (Ljava/lang/Object;)Z + public final fun getValue ()Ljava/lang/String; + public final fun hashCode ()I + public final fun toString ()Ljava/lang/String; +} + +public final class dev/kord/common/entity/ActivityPlatform$Android : dev/kord/common/entity/ActivityPlatform { + public static final field INSTANCE Ldev/kord/common/entity/ActivityPlatform$Android; +} + +public final class dev/kord/common/entity/ActivityPlatform$Companion { + public final fun from (Ljava/lang/String;)Ldev/kord/common/entity/ActivityPlatform; + public final fun getEntries ()Ljava/util/List; + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/kord/common/entity/ActivityPlatform$Desktop : dev/kord/common/entity/ActivityPlatform { + public static final field INSTANCE Ldev/kord/common/entity/ActivityPlatform$Desktop; +} + +public final class dev/kord/common/entity/ActivityPlatform$Embedded : dev/kord/common/entity/ActivityPlatform { + public static final field INSTANCE Ldev/kord/common/entity/ActivityPlatform$Embedded; +} + +public final class dev/kord/common/entity/ActivityPlatform$Ios : dev/kord/common/entity/ActivityPlatform { + public static final field INSTANCE Ldev/kord/common/entity/ActivityPlatform$Ios; +} + +public final class dev/kord/common/entity/ActivityPlatform$PS4 : dev/kord/common/entity/ActivityPlatform { + public static final field INSTANCE Ldev/kord/common/entity/ActivityPlatform$PS4; +} + +public final class dev/kord/common/entity/ActivityPlatform$PS5 : dev/kord/common/entity/ActivityPlatform { + public static final field INSTANCE Ldev/kord/common/entity/ActivityPlatform$PS5; +} + +public final class dev/kord/common/entity/ActivityPlatform$Samsung : dev/kord/common/entity/ActivityPlatform { + public static final field INSTANCE Ldev/kord/common/entity/ActivityPlatform$Samsung; +} + +public final class dev/kord/common/entity/ActivityPlatform$Unknown : dev/kord/common/entity/ActivityPlatform { +} + +public final class dev/kord/common/entity/ActivityPlatform$Xbox : dev/kord/common/entity/ActivityPlatform { + public static final field INSTANCE Ldev/kord/common/entity/ActivityPlatform$Xbox; +} + public abstract class dev/kord/common/entity/ActivityType { public static final field Companion Ldev/kord/common/entity/ActivityType$Companion; public synthetic fun (ILkotlin/jvm/internal/DefaultConstructorMarker;)V @@ -2174,15 +2224,16 @@ public final class dev/kord/common/entity/DeletedMessage$Companion { public final class dev/kord/common/entity/DiscordActivity { public static final field Companion Ldev/kord/common/entity/DiscordActivity$Companion; - public fun (Ljava/lang/String;Ldev/kord/common/entity/ActivityType;Ldev/kord/common/entity/optional/Optional;Lkotlinx/datetime/Instant;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/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;)V - public synthetic fun (Ljava/lang/String;Ldev/kord/common/entity/ActivityType;Ldev/kord/common/entity/optional/Optional;Lkotlinx/datetime/Instant;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/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ldev/kord/common/entity/ActivityType;Ldev/kord/common/entity/optional/Optional;Lkotlinx/datetime/Instant;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/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;)V + public synthetic fun (Ljava/lang/String;Ldev/kord/common/entity/ActivityType;Ldev/kord/common/entity/optional/Optional;Lkotlinx/datetime/Instant;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/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; public final fun component10 ()Ldev/kord/common/entity/optional/Optional; public final fun component11 ()Ldev/kord/common/entity/optional/Optional; public final fun component12 ()Ldev/kord/common/entity/optional/Optional; - public final fun component13 ()Ldev/kord/common/entity/optional/OptionalBoolean; - public final fun component14 ()Ldev/kord/common/entity/optional/Optional; + public final fun component13 ()Ldev/kord/common/entity/optional/Optional; + public final fun component14 ()Ldev/kord/common/entity/optional/OptionalBoolean; public final fun component15 ()Ldev/kord/common/entity/optional/Optional; + public final fun component16 ()Ldev/kord/common/entity/optional/Optional; public final fun component2 ()Ldev/kord/common/entity/ActivityType; public final fun component3 ()Ldev/kord/common/entity/optional/Optional; public final fun component4 ()Lkotlinx/datetime/Instant; @@ -2191,8 +2242,8 @@ public final class dev/kord/common/entity/DiscordActivity { public final fun component7 ()Ldev/kord/common/entity/optional/Optional; public final fun component8 ()Ldev/kord/common/entity/optional/Optional; public final fun component9 ()Ldev/kord/common/entity/optional/Optional; - public final fun copy (Ljava/lang/String;Ldev/kord/common/entity/ActivityType;Ldev/kord/common/entity/optional/Optional;Lkotlinx/datetime/Instant;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/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;)Ldev/kord/common/entity/DiscordActivity; - public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordActivity;Ljava/lang/String;Ldev/kord/common/entity/ActivityType;Ldev/kord/common/entity/optional/Optional;Lkotlinx/datetime/Instant;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/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordActivity; + public final fun copy (Ljava/lang/String;Ldev/kord/common/entity/ActivityType;Ldev/kord/common/entity/optional/Optional;Lkotlinx/datetime/Instant;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/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;)Ldev/kord/common/entity/DiscordActivity; + public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordActivity;Ljava/lang/String;Ldev/kord/common/entity/ActivityType;Ldev/kord/common/entity/optional/Optional;Lkotlinx/datetime/Instant;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/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordActivity; public fun equals (Ljava/lang/Object;)Z public final fun getApplicationId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public final fun getAssets ()Ldev/kord/common/entity/optional/Optional; @@ -2204,6 +2255,7 @@ public final class dev/kord/common/entity/DiscordActivity { public final fun getInstance ()Ldev/kord/common/entity/optional/OptionalBoolean; public final fun getName ()Ljava/lang/String; public final fun getParty ()Ldev/kord/common/entity/optional/Optional; + public final fun getPlatform ()Ldev/kord/common/entity/optional/Optional; public final fun getSecrets ()Ldev/kord/common/entity/optional/Optional; public final fun getState ()Ldev/kord/common/entity/optional/Optional; public final fun getTimestamps ()Ldev/kord/common/entity/optional/Optional; diff --git a/common/api/common.klib.api b/common/api/common.klib.api index 309c5b6cec06..83813bf1ba10 100644 --- a/common/api/common.klib.api +++ b/common/api/common.klib.api @@ -622,7 +622,7 @@ final class dev.kord.common.entity/DeletedMessage { // dev.kord.common.entity/De } final class dev.kord.common.entity/DiscordActivity { // dev.kord.common.entity/DiscordActivity|null[0] - constructor (kotlin/String, dev.kord.common.entity/ActivityType, dev.kord.common.entity.optional/Optional = ..., kotlinx.datetime/Instant, 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/OptionalBoolean = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional> = ...) // dev.kord.common.entity/DiscordActivity.|(kotlin.String;dev.kord.common.entity.ActivityType;dev.kord.common.entity.optional.Optional;kotlinx.datetime.Instant;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.OptionalBoolean;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional>){}[0] + constructor (kotlin/String, dev.kord.common.entity/ActivityType, dev.kord.common.entity.optional/Optional = ..., kotlinx.datetime/Instant, 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/OptionalBoolean = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional> = ...) // dev.kord.common.entity/DiscordActivity.|(kotlin.String;dev.kord.common.entity.ActivityType;dev.kord.common.entity.optional.Optional;kotlinx.datetime.Instant;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.OptionalBoolean;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional>){}[0] final val applicationId // dev.kord.common.entity/DiscordActivity.applicationId|{}applicationId[0] final fun (): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.common.entity/DiscordActivity.applicationId.|(){}[0] @@ -644,6 +644,8 @@ final class dev.kord.common.entity/DiscordActivity { // dev.kord.common.entity/D final fun (): kotlin/String // dev.kord.common.entity/DiscordActivity.name.|(){}[0] final val party // dev.kord.common.entity/DiscordActivity.party|{}party[0] final fun (): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordActivity.party.|(){}[0] + final val platform // dev.kord.common.entity/DiscordActivity.platform|{}platform[0] + final fun (): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordActivity.platform.|(){}[0] final val secrets // dev.kord.common.entity/DiscordActivity.secrets|{}secrets[0] final fun (): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordActivity.secrets.|(){}[0] final val state // dev.kord.common.entity/DiscordActivity.state|{}state[0] @@ -656,12 +658,13 @@ final class dev.kord.common.entity/DiscordActivity { // dev.kord.common.entity/D final fun (): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordActivity.url.|(){}[0] final fun component1(): kotlin/String // dev.kord.common.entity/DiscordActivity.component1|component1(){}[0] - final fun component10(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordActivity.component10|component10(){}[0] - final fun component11(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordActivity.component11|component11(){}[0] - final fun component12(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordActivity.component12|component12(){}[0] - final fun component13(): dev.kord.common.entity.optional/OptionalBoolean // dev.kord.common.entity/DiscordActivity.component13|component13(){}[0] - final fun component14(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordActivity.component14|component14(){}[0] - final fun component15(): dev.kord.common.entity.optional/Optional> // dev.kord.common.entity/DiscordActivity.component15|component15(){}[0] + final fun component10(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordActivity.component10|component10(){}[0] + final fun component11(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordActivity.component11|component11(){}[0] + final fun component12(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordActivity.component12|component12(){}[0] + final fun component13(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordActivity.component13|component13(){}[0] + final fun component14(): dev.kord.common.entity.optional/OptionalBoolean // dev.kord.common.entity/DiscordActivity.component14|component14(){}[0] + final fun component15(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordActivity.component15|component15(){}[0] + final fun component16(): dev.kord.common.entity.optional/Optional> // dev.kord.common.entity/DiscordActivity.component16|component16(){}[0] final fun component2(): dev.kord.common.entity/ActivityType // dev.kord.common.entity/DiscordActivity.component2|component2(){}[0] final fun component3(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordActivity.component3|component3(){}[0] final fun component4(): kotlinx.datetime/Instant // dev.kord.common.entity/DiscordActivity.component4|component4(){}[0] @@ -669,8 +672,8 @@ final class dev.kord.common.entity/DiscordActivity { // dev.kord.common.entity/D final fun component6(): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.common.entity/DiscordActivity.component6|component6(){}[0] final fun component7(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordActivity.component7|component7(){}[0] final fun component8(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordActivity.component8|component8(){}[0] - final fun component9(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordActivity.component9|component9(){}[0] - final fun copy(kotlin/String = ..., dev.kord.common.entity/ActivityType = ..., dev.kord.common.entity.optional/Optional = ..., kotlinx.datetime/Instant = ..., 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/OptionalBoolean = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional> = ...): dev.kord.common.entity/DiscordActivity // dev.kord.common.entity/DiscordActivity.copy|copy(kotlin.String;dev.kord.common.entity.ActivityType;dev.kord.common.entity.optional.Optional;kotlinx.datetime.Instant;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.OptionalBoolean;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional>){}[0] + final fun component9(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordActivity.component9|component9(){}[0] + final fun copy(kotlin/String = ..., dev.kord.common.entity/ActivityType = ..., dev.kord.common.entity.optional/Optional = ..., kotlinx.datetime/Instant = ..., 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/OptionalBoolean = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional> = ...): dev.kord.common.entity/DiscordActivity // dev.kord.common.entity/DiscordActivity.copy|copy(kotlin.String;dev.kord.common.entity.ActivityType;dev.kord.common.entity.optional.Optional;kotlinx.datetime.Instant;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.OptionalBoolean;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional>){}[0] final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.common.entity/DiscordActivity.equals|equals(kotlin.Any?){}[0] final fun hashCode(): kotlin/Int // dev.kord.common.entity/DiscordActivity.hashCode|hashCode(){}[0] final fun toString(): kotlin/String // dev.kord.common.entity/DiscordActivity.toString|toString(){}[0] @@ -7089,6 +7092,41 @@ sealed class dev.kord.common.entity/ActivityFlag { // dev.kord.common.entity/Act final object Sync : dev.kord.common.entity/ActivityFlag // dev.kord.common.entity/ActivityFlag.Sync|null[0] } +sealed class dev.kord.common.entity/ActivityPlatform { // dev.kord.common.entity/ActivityPlatform|null[0] + final val value // dev.kord.common.entity/ActivityPlatform.value|{}value[0] + final fun (): kotlin/String // dev.kord.common.entity/ActivityPlatform.value.|(){}[0] + + final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.common.entity/ActivityPlatform.equals|equals(kotlin.Any?){}[0] + final fun hashCode(): kotlin/Int // dev.kord.common.entity/ActivityPlatform.hashCode|hashCode(){}[0] + final fun toString(): kotlin/String // dev.kord.common.entity/ActivityPlatform.toString|toString(){}[0] + + final class Unknown : dev.kord.common.entity/ActivityPlatform // dev.kord.common.entity/ActivityPlatform.Unknown|null[0] + + final object Android : dev.kord.common.entity/ActivityPlatform // dev.kord.common.entity/ActivityPlatform.Android|null[0] + + final object Companion { // dev.kord.common.entity/ActivityPlatform.Companion|null[0] + final val entries // dev.kord.common.entity/ActivityPlatform.Companion.entries|{}entries[0] + final fun (): kotlin.collections/List // dev.kord.common.entity/ActivityPlatform.Companion.entries.|(){}[0] + + final fun from(kotlin/String): dev.kord.common.entity/ActivityPlatform // dev.kord.common.entity/ActivityPlatform.Companion.from|from(kotlin.String){}[0] + final fun serializer(): kotlinx.serialization/KSerializer // dev.kord.common.entity/ActivityPlatform.Companion.serializer|serializer(){}[0] + } + + final object Desktop : dev.kord.common.entity/ActivityPlatform // dev.kord.common.entity/ActivityPlatform.Desktop|null[0] + + final object Embedded : dev.kord.common.entity/ActivityPlatform // dev.kord.common.entity/ActivityPlatform.Embedded|null[0] + + final object Ios : dev.kord.common.entity/ActivityPlatform // dev.kord.common.entity/ActivityPlatform.Ios|null[0] + + final object PS4 : dev.kord.common.entity/ActivityPlatform // dev.kord.common.entity/ActivityPlatform.PS4|null[0] + + final object PS5 : dev.kord.common.entity/ActivityPlatform // dev.kord.common.entity/ActivityPlatform.PS5|null[0] + + final object Samsung : dev.kord.common.entity/ActivityPlatform // dev.kord.common.entity/ActivityPlatform.Samsung|null[0] + + final object Xbox : dev.kord.common.entity/ActivityPlatform // dev.kord.common.entity/ActivityPlatform.Xbox|null[0] +} + sealed class dev.kord.common.entity/ActivityType { // dev.kord.common.entity/ActivityType|null[0] final val code // dev.kord.common.entity/ActivityType.code|{}code[0] final fun (): kotlin/Int // dev.kord.common.entity/ActivityType.code.|(){}[0] diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ActivityPlatform.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ActivityPlatform.kt new file mode 100644 index 000000000000..143f85eb2dbb --- /dev/null +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ActivityPlatform.kt @@ -0,0 +1,106 @@ +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! +@file:Suppress(names = arrayOf("IncorrectFormatting", "ReplaceArrayOfWithLiteral", + "SpellCheckingInspection", "GrazieInspection")) + +package dev.kord.common.entity + +import kotlin.LazyThreadSafetyMode.PUBLICATION +import kotlinx.serialization.KSerializer +import kotlinx.serialization.Serializable +import kotlinx.serialization.descriptors.PrimitiveKind +import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor +import kotlinx.serialization.descriptors.SerialDescriptor +import kotlinx.serialization.encoding.Decoder +import kotlinx.serialization.encoding.Encoder + +/** + * See [ActivityPlatform]s in the + * [Discord Developer Documentation](https://discord.com/developers/docs/events/gateway-events#activity-object). + */ +@Serializable(with = ActivityPlatform.Serializer::class) +public sealed class ActivityPlatform( + /** + * The raw value used by Discord. + */ + public val `value`: String, +) { + final override fun equals(other: Any?): Boolean = this === other || + (other is ActivityPlatform && this.value == other.value) + + final override fun hashCode(): Int = value.hashCode() + + final override fun toString(): String = + if (this is Unknown) "ActivityPlatform.Unknown(value=$value)" + else "ActivityPlatform.${this::class.simpleName}" + + /** + * An unknown [ActivityPlatform]. + * + * This is used as a fallback for [ActivityPlatform]s that haven't been added to Kord yet. + */ + public class Unknown internal constructor( + `value`: String, + ) : ActivityPlatform(value) + + public object Desktop : ActivityPlatform("desktop") + + public object Xbox : ActivityPlatform("xbox") + + public object Samsung : ActivityPlatform("samsung") + + public object Ios : ActivityPlatform("ios") + + public object Android : ActivityPlatform("android") + + public object Embedded : ActivityPlatform("embedded") + + public object PS4 : ActivityPlatform("ps4") + + public object PS5 : ActivityPlatform("ps5") + + internal object Serializer : KSerializer { + override val descriptor: SerialDescriptor = + PrimitiveSerialDescriptor("dev.kord.common.entity.ActivityPlatform", + PrimitiveKind.STRING) + + override fun serialize(encoder: Encoder, `value`: ActivityPlatform) { + encoder.encodeString(value.value) + } + + override fun deserialize(decoder: Decoder): ActivityPlatform = from(decoder.decodeString()) + } + + public companion object { + /** + * A [List] of all known [ActivityPlatform]s. + */ + public val entries: List by lazy(mode = PUBLICATION) { + listOf( + Desktop, + Xbox, + Samsung, + Ios, + Android, + Embedded, + PS4, + PS5, + ) + } + + /** + * Returns an instance of [ActivityPlatform] with [ActivityPlatform.value] equal to the + * specified [value]. + */ + public fun from(`value`: String): ActivityPlatform = when (value) { + "desktop" -> Desktop + "xbox" -> Xbox + "samsung" -> Samsung + "ios" -> Ios + "android" -> Android + "embedded" -> Embedded + "ps4" -> PS4 + "ps5" -> PS5 + else -> Unknown(value) + } + } +} diff --git a/common/src/commonMain/kotlin/entity/DiscordActivity.kt b/common/src/commonMain/kotlin/entity/DiscordActivity.kt index ec278b3f3227..f4d05865b18a 100644 --- a/common/src/commonMain/kotlin/entity/DiscordActivity.kt +++ b/common/src/commonMain/kotlin/entity/DiscordActivity.kt @@ -27,6 +27,21 @@ ], ) +@file:Generate( + STRING_KORD_ENUM, name = "ActivityPlatform", + docUrl = "https://discord.com/developers/docs/events/gateway-events#activity-object", + entries = [ + Entry("Desktop", stringValue = "desktop"), + Entry("Xbox", stringValue = "xbox"), + Entry("Samsung", stringValue = "samsung"), + Entry("Ios", stringValue = "ios"), + Entry("Android", stringValue = "android"), + Entry("Embedded", stringValue = "embedded"), + Entry("PS4", stringValue = "ps4"), + Entry("PS5", stringValue = "ps5"), + ], +) + package dev.kord.common.entity import dev.kord.common.entity.optional.Optional @@ -36,6 +51,7 @@ import dev.kord.common.serialization.InstantInEpochMilliseconds import dev.kord.ksp.Generate import dev.kord.ksp.Generate.EntityType.INT_FLAGS import dev.kord.ksp.Generate.EntityType.INT_KORD_ENUM +import dev.kord.ksp.Generate.EntityType.STRING_KORD_ENUM import dev.kord.ksp.Generate.Entry import kotlinx.serialization.* import kotlinx.serialization.builtins.ListSerializer @@ -64,6 +80,7 @@ public data class DiscordActivity( val applicationId: OptionalSnowflake = OptionalSnowflake.Missing, val details: Optional = Optional.Missing(), val state: Optional = Optional.Missing(), + val platform: Optional = Optional.Missing(), val emoji: Optional = Optional.Missing(), val party: Optional = Optional.Missing(), val assets: Optional = Optional.Missing(), diff --git a/core/api/core.api b/core/api/core.api index a038d4920bbc..3570bd06029d 100644 --- a/core/api/core.api +++ b/core/api/core.api @@ -2318,15 +2318,16 @@ public final class dev/kord/core/cache/ViewKeys { public final class dev/kord/core/cache/data/ActivityData { public static final field Companion Ldev/kord/core/cache/data/ActivityData$Companion; - public fun (Ljava/lang/String;Ldev/kord/common/entity/ActivityType;Ldev/kord/common/entity/optional/Optional;Lkotlinx/datetime/Instant;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/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;)V - public synthetic fun (Ljava/lang/String;Ldev/kord/common/entity/ActivityType;Ldev/kord/common/entity/optional/Optional;Lkotlinx/datetime/Instant;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/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ldev/kord/common/entity/ActivityType;Ldev/kord/common/entity/optional/Optional;Lkotlinx/datetime/Instant;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/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;)V + public synthetic fun (Ljava/lang/String;Ldev/kord/common/entity/ActivityType;Ldev/kord/common/entity/optional/Optional;Lkotlinx/datetime/Instant;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/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; public final fun component10 ()Ldev/kord/common/entity/optional/Optional; public final fun component11 ()Ldev/kord/common/entity/optional/Optional; public final fun component12 ()Ldev/kord/common/entity/optional/Optional; - public final fun component13 ()Ldev/kord/common/entity/optional/OptionalBoolean; - public final fun component14 ()Ldev/kord/common/entity/optional/Optional; + public final fun component13 ()Ldev/kord/common/entity/optional/Optional; + public final fun component14 ()Ldev/kord/common/entity/optional/OptionalBoolean; public final fun component15 ()Ldev/kord/common/entity/optional/Optional; + public final fun component16 ()Ldev/kord/common/entity/optional/Optional; public final fun component2 ()Ldev/kord/common/entity/ActivityType; public final fun component3 ()Ldev/kord/common/entity/optional/Optional; public final fun component4 ()Lkotlinx/datetime/Instant; @@ -2335,8 +2336,8 @@ public final class dev/kord/core/cache/data/ActivityData { public final fun component7 ()Ldev/kord/common/entity/optional/Optional; public final fun component8 ()Ldev/kord/common/entity/optional/Optional; public final fun component9 ()Ldev/kord/common/entity/optional/Optional; - public final fun copy (Ljava/lang/String;Ldev/kord/common/entity/ActivityType;Ldev/kord/common/entity/optional/Optional;Lkotlinx/datetime/Instant;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/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;)Ldev/kord/core/cache/data/ActivityData; - public static synthetic fun copy$default (Ldev/kord/core/cache/data/ActivityData;Ljava/lang/String;Ldev/kord/common/entity/ActivityType;Ldev/kord/common/entity/optional/Optional;Lkotlinx/datetime/Instant;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/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/Object;)Ldev/kord/core/cache/data/ActivityData; + public final fun copy (Ljava/lang/String;Ldev/kord/common/entity/ActivityType;Ldev/kord/common/entity/optional/Optional;Lkotlinx/datetime/Instant;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/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;)Ldev/kord/core/cache/data/ActivityData; + public static synthetic fun copy$default (Ldev/kord/core/cache/data/ActivityData;Ljava/lang/String;Ldev/kord/common/entity/ActivityType;Ldev/kord/common/entity/optional/Optional;Lkotlinx/datetime/Instant;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/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/Object;)Ldev/kord/core/cache/data/ActivityData; public fun equals (Ljava/lang/Object;)Z public final fun getApplicationId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public final fun getAssets ()Ldev/kord/common/entity/optional/Optional; @@ -2348,6 +2349,7 @@ public final class dev/kord/core/cache/data/ActivityData { public final fun getInstance ()Ldev/kord/common/entity/optional/OptionalBoolean; public final fun getName ()Ljava/lang/String; public final fun getParty ()Ldev/kord/common/entity/optional/Optional; + public final fun getPlatform ()Ldev/kord/common/entity/optional/Optional; public final fun getSecrets ()Ldev/kord/common/entity/optional/Optional; public final fun getState ()Ldev/kord/common/entity/optional/Optional; public final fun getTimestamps ()Ldev/kord/common/entity/optional/Optional; @@ -5790,6 +5792,7 @@ public final class dev/kord/core/entity/Activity { public final fun getFlags ()Ldev/kord/common/entity/ActivityFlags; public final fun getName ()Ljava/lang/String; public final fun getParty ()Ldev/kord/core/entity/Activity$Party; + public final fun getPlatform ()Ldev/kord/common/entity/ActivityPlatform; public final fun getSecrets ()Ldev/kord/core/entity/Activity$Secrets; public final fun getStart ()Lkotlinx/datetime/Instant; public final fun getState ()Ljava/lang/String; diff --git a/core/api/core.klib.api b/core/api/core.klib.api index 415e25074e98..db4577ec60c6 100644 --- a/core/api/core.klib.api +++ b/core/api/core.klib.api @@ -1772,7 +1772,7 @@ final class dev.kord.core.builder.kord/KordRestOnlyBuilder : dev.kord.core.build } final class dev.kord.core.cache.data/ActivityData { // dev.kord.core.cache.data/ActivityData|null[0] - constructor (kotlin/String, dev.kord.common.entity/ActivityType, dev.kord.common.entity.optional/Optional = ..., kotlinx.datetime/Instant, 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/OptionalBoolean = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional> = ...) // dev.kord.core.cache.data/ActivityData.|(kotlin.String;dev.kord.common.entity.ActivityType;dev.kord.common.entity.optional.Optional;kotlinx.datetime.Instant;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.OptionalBoolean;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional>){}[0] + constructor (kotlin/String, dev.kord.common.entity/ActivityType, dev.kord.common.entity.optional/Optional = ..., kotlinx.datetime/Instant, 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/OptionalBoolean = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional> = ...) // dev.kord.core.cache.data/ActivityData.|(kotlin.String;dev.kord.common.entity.ActivityType;dev.kord.common.entity.optional.Optional;kotlinx.datetime.Instant;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.OptionalBoolean;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional>){}[0] final val applicationId // dev.kord.core.cache.data/ActivityData.applicationId|{}applicationId[0] final fun (): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.core.cache.data/ActivityData.applicationId.|(){}[0] @@ -1794,6 +1794,8 @@ final class dev.kord.core.cache.data/ActivityData { // dev.kord.core.cache.data/ final fun (): kotlin/String // dev.kord.core.cache.data/ActivityData.name.|(){}[0] final val party // dev.kord.core.cache.data/ActivityData.party|{}party[0] final fun (): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/ActivityData.party.|(){}[0] + final val platform // dev.kord.core.cache.data/ActivityData.platform|{}platform[0] + final fun (): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/ActivityData.platform.|(){}[0] final val secrets // dev.kord.core.cache.data/ActivityData.secrets|{}secrets[0] final fun (): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/ActivityData.secrets.|(){}[0] final val state // dev.kord.core.cache.data/ActivityData.state|{}state[0] @@ -1806,12 +1808,13 @@ final class dev.kord.core.cache.data/ActivityData { // dev.kord.core.cache.data/ final fun (): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/ActivityData.url.|(){}[0] final fun component1(): kotlin/String // dev.kord.core.cache.data/ActivityData.component1|component1(){}[0] - final fun component10(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/ActivityData.component10|component10(){}[0] - final fun component11(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/ActivityData.component11|component11(){}[0] - final fun component12(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/ActivityData.component12|component12(){}[0] - final fun component13(): dev.kord.common.entity.optional/OptionalBoolean // dev.kord.core.cache.data/ActivityData.component13|component13(){}[0] - final fun component14(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/ActivityData.component14|component14(){}[0] - final fun component15(): dev.kord.common.entity.optional/Optional> // dev.kord.core.cache.data/ActivityData.component15|component15(){}[0] + final fun component10(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/ActivityData.component10|component10(){}[0] + final fun component11(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/ActivityData.component11|component11(){}[0] + final fun component12(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/ActivityData.component12|component12(){}[0] + final fun component13(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/ActivityData.component13|component13(){}[0] + final fun component14(): dev.kord.common.entity.optional/OptionalBoolean // dev.kord.core.cache.data/ActivityData.component14|component14(){}[0] + final fun component15(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/ActivityData.component15|component15(){}[0] + final fun component16(): dev.kord.common.entity.optional/Optional> // dev.kord.core.cache.data/ActivityData.component16|component16(){}[0] final fun component2(): dev.kord.common.entity/ActivityType // dev.kord.core.cache.data/ActivityData.component2|component2(){}[0] final fun component3(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/ActivityData.component3|component3(){}[0] final fun component4(): kotlinx.datetime/Instant // dev.kord.core.cache.data/ActivityData.component4|component4(){}[0] @@ -1819,8 +1822,8 @@ final class dev.kord.core.cache.data/ActivityData { // dev.kord.core.cache.data/ final fun component6(): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.core.cache.data/ActivityData.component6|component6(){}[0] final fun component7(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/ActivityData.component7|component7(){}[0] final fun component8(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/ActivityData.component8|component8(){}[0] - final fun component9(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/ActivityData.component9|component9(){}[0] - final fun copy(kotlin/String = ..., dev.kord.common.entity/ActivityType = ..., dev.kord.common.entity.optional/Optional = ..., kotlinx.datetime/Instant = ..., 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/OptionalBoolean = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional> = ...): dev.kord.core.cache.data/ActivityData // dev.kord.core.cache.data/ActivityData.copy|copy(kotlin.String;dev.kord.common.entity.ActivityType;dev.kord.common.entity.optional.Optional;kotlinx.datetime.Instant;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.OptionalBoolean;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional>){}[0] + final fun component9(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/ActivityData.component9|component9(){}[0] + final fun copy(kotlin/String = ..., dev.kord.common.entity/ActivityType = ..., dev.kord.common.entity.optional/Optional = ..., kotlinx.datetime/Instant = ..., 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/OptionalBoolean = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional> = ...): dev.kord.core.cache.data/ActivityData // dev.kord.core.cache.data/ActivityData.copy|copy(kotlin.String;dev.kord.common.entity.ActivityType;dev.kord.common.entity.optional.Optional;kotlinx.datetime.Instant;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.OptionalBoolean;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional>){}[0] final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.core.cache.data/ActivityData.equals|equals(kotlin.Any?){}[0] final fun hashCode(): kotlin/Int // dev.kord.core.cache.data/ActivityData.hashCode|hashCode(){}[0] final fun toString(): kotlin/String // dev.kord.core.cache.data/ActivityData.toString|toString(){}[0] @@ -7112,6 +7115,8 @@ final class dev.kord.core.entity/Activity { // dev.kord.core.entity/Activity|nul final fun (): kotlin/String // dev.kord.core.entity/Activity.name.|(){}[0] final val party // dev.kord.core.entity/Activity.party|{}party[0] final fun (): dev.kord.core.entity/Activity.Party? // dev.kord.core.entity/Activity.party.|(){}[0] + final val platform // dev.kord.core.entity/Activity.platform|{}platform[0] + final fun (): dev.kord.common.entity/ActivityPlatform? // dev.kord.core.entity/Activity.platform.|(){}[0] final val secrets // dev.kord.core.entity/Activity.secrets|{}secrets[0] final fun (): dev.kord.core.entity/Activity.Secrets // dev.kord.core.entity/Activity.secrets.|(){}[0] final val start // dev.kord.core.entity/Activity.start|{}start[0] diff --git a/core/src/commonMain/kotlin/cache/data/ActivityData.kt b/core/src/commonMain/kotlin/cache/data/ActivityData.kt index 6a68104e7359..02e3bba5f32d 100644 --- a/core/src/commonMain/kotlin/cache/data/ActivityData.kt +++ b/core/src/commonMain/kotlin/cache/data/ActivityData.kt @@ -17,6 +17,7 @@ public data class ActivityData( val applicationId: OptionalSnowflake = OptionalSnowflake.Missing, val details: Optional = Optional.Missing(), val state: Optional = Optional.Missing(), + val platform: Optional = Optional.Missing(), val emoji: Optional = Optional.Missing(), val party: Optional = Optional.Missing(), val assets: Optional = Optional.Missing(), @@ -36,6 +37,7 @@ public data class ActivityData( applicationId, details, state, + platform, emoji, party, assets, diff --git a/core/src/commonMain/kotlin/entity/Activity.kt b/core/src/commonMain/kotlin/entity/Activity.kt index 4aa264fb25aa..99096e78767a 100644 --- a/core/src/commonMain/kotlin/entity/Activity.kt +++ b/core/src/commonMain/kotlin/entity/Activity.kt @@ -1,6 +1,7 @@ package dev.kord.core.entity import dev.kord.common.entity.ActivityFlags +import dev.kord.common.entity.ActivityPlatform import dev.kord.common.entity.ActivityType import dev.kord.common.entity.DiscordActivityEmoji import dev.kord.common.entity.Snowflake @@ -25,6 +26,8 @@ public class Activity(public val data: ActivityData) { public val state: String? get() = data.state.value + public val platform: ActivityPlatform? get() = data.platform.value + public val party: Party? get() = data.party.value?.let { Party(