From 7921c782fcf1fbb328dc747a6481efa73fda9593 Mon Sep 17 00:00:00 2001 From: Michael Rittmeister Date: Sun, 25 Aug 2024 16:32:19 +0200 Subject: [PATCH] Add support for Message forwarding --- common/api/common.api | 79 ++++++++++++++--- common/api/common.klib.api | 87 +++++++++++++++--- .../common/entity/MessageReferenceType.kt | 88 +++++++++++++++++++ .../kotlin/entity/DiscordMessage.kt | 14 +++ core/api/core.api | 56 ++++++++++-- core/api/core.klib.api | 77 ++++++++++++++-- .../kotlin/cache/data/MessageData.kt | 3 + .../kotlin/cache/data/PartialMessageData.kt | 13 +++ core/src/commonMain/kotlin/entity/Message.kt | 9 +- .../kotlin/entity/MessageReference.kt | 19 ++++ 10 files changed, 405 insertions(+), 40 deletions(-) create mode 100644 common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageReferenceType.kt create mode 100644 core/src/commonMain/kotlin/cache/data/PartialMessageData.kt diff --git a/common/api/common.api b/common/api/common.api index c5b3b0f34e9..646c8f2d8c5 100644 --- a/common/api/common.api +++ b/common/api/common.api @@ -4541,8 +4541,8 @@ public final class dev/kord/common/entity/DiscordMentionedChannel$Companion { public final class dev/kord/common/entity/DiscordMessage { public static final field Companion Ldev/kord/common/entity/DiscordMessage$Companion; - public fun (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/DiscordUser;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;ZZLjava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/MessageType;Ldev/kord/common/entity/optional/Optional;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/optional/OptionalInt;)V - public synthetic fun (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/DiscordUser;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;ZZLjava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/MessageType;Ldev/kord/common/entity/optional/Optional;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/optional/OptionalInt;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/DiscordUser;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;ZZLjava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/MessageType;Ldev/kord/common/entity/optional/Optional;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/optional/Optional;Ldev/kord/common/entity/optional/OptionalInt;)V + public synthetic fun (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/DiscordUser;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;ZZLjava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/MessageType;Ldev/kord/common/entity/optional/Optional;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/optional/Optional;Ldev/kord/common/entity/optional/OptionalInt;IILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/kord/common/entity/Snowflake; public final fun component10 ()Z public final fun component11 ()Ljava/util/List; @@ -4568,15 +4568,16 @@ public final class dev/kord/common/entity/DiscordMessage { public final fun component3 ()Ldev/kord/common/entity/optional/OptionalSnowflake; public final fun component30 ()Ldev/kord/common/entity/optional/Optional; public final fun component31 ()Ldev/kord/common/entity/optional/Optional; - public final fun component32 ()Ldev/kord/common/entity/optional/OptionalInt; + public final fun component32 ()Ldev/kord/common/entity/optional/Optional; + public final fun component33 ()Ldev/kord/common/entity/optional/OptionalInt; public final fun component4 ()Ldev/kord/common/entity/DiscordUser; public final fun component5 ()Ldev/kord/common/entity/optional/Optional; public final fun component6 ()Ljava/lang/String; public final fun component7 ()Lkotlinx/datetime/Instant; public final fun component8 ()Lkotlinx/datetime/Instant; public final fun component9 ()Z - public final fun copy (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/DiscordUser;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;ZZLjava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/MessageType;Ldev/kord/common/entity/optional/Optional;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/optional/OptionalInt;)Ldev/kord/common/entity/DiscordMessage; - public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordMessage;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/DiscordUser;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;ZZLjava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/MessageType;Ldev/kord/common/entity/optional/Optional;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/optional/OptionalInt;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordMessage; + public final fun copy (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/DiscordUser;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;ZZLjava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/MessageType;Ldev/kord/common/entity/optional/Optional;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/optional/Optional;Ldev/kord/common/entity/optional/OptionalInt;)Ldev/kord/common/entity/DiscordMessage; + public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordMessage;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/DiscordUser;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;ZZLjava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/MessageType;Ldev/kord/common/entity/optional/Optional;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/optional/Optional;Ldev/kord/common/entity/optional/OptionalInt;IILjava/lang/Object;)Ldev/kord/common/entity/DiscordMessage; public fun equals (Ljava/lang/Object;)Z public final fun getActivity ()Ldev/kord/common/entity/optional/Optional; public final fun getApplication ()Ldev/kord/common/entity/optional/Optional; @@ -4598,6 +4599,7 @@ public final class dev/kord/common/entity/DiscordMessage { public final fun getMentionedChannels ()Ldev/kord/common/entity/optional/Optional; public final fun getMentions ()Ljava/util/List; public final fun getMessageReference ()Ldev/kord/common/entity/optional/Optional; + public final fun getMessageSnapshots ()Ldev/kord/common/entity/optional/Optional; public final fun getNonce ()Ldev/kord/common/entity/optional/Optional; public final fun getPinned ()Z public final fun getPosition ()Ldev/kord/common/entity/optional/OptionalInt; @@ -4665,19 +4667,21 @@ public final class dev/kord/common/entity/DiscordMessageInteraction$Companion { public final class dev/kord/common/entity/DiscordMessageReference { public static final field Companion Ldev/kord/common/entity/DiscordMessageReference$Companion; public fun ()V - public fun (Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalBoolean;)V - public synthetic fun (Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalBoolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ldev/kord/common/entity/optional/OptionalSnowflake; + public fun (Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalBoolean;)V + public synthetic fun (Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalBoolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ldev/kord/common/entity/optional/Optional; public final fun component2 ()Ldev/kord/common/entity/optional/OptionalSnowflake; public final fun component3 ()Ldev/kord/common/entity/optional/OptionalSnowflake; - public final fun component4 ()Ldev/kord/common/entity/optional/OptionalBoolean; - public final fun copy (Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalBoolean;)Ldev/kord/common/entity/DiscordMessageReference; - public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordMessageReference;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalBoolean;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordMessageReference; + public final fun component4 ()Ldev/kord/common/entity/optional/OptionalSnowflake; + public final fun component5 ()Ldev/kord/common/entity/optional/OptionalBoolean; + public final fun copy (Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalBoolean;)Ldev/kord/common/entity/DiscordMessageReference; + public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordMessageReference;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalBoolean;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordMessageReference; public fun equals (Ljava/lang/Object;)Z public final fun getChannelId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public final fun getFailIfNotExists ()Ldev/kord/common/entity/optional/OptionalBoolean; public final fun getGuildId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public final fun getId ()Ldev/kord/common/entity/optional/OptionalSnowflake; + public final fun getType ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; } @@ -4697,6 +4701,33 @@ public final class dev/kord/common/entity/DiscordMessageReference$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class dev/kord/common/entity/DiscordMessageSnapshot { + public static final field Companion Ldev/kord/common/entity/DiscordMessageSnapshot$Companion; + public fun (Ldev/kord/common/entity/DiscordMessage;)V + public final fun component1 ()Ldev/kord/common/entity/DiscordMessage; + public final fun copy (Ldev/kord/common/entity/DiscordMessage;)Ldev/kord/common/entity/DiscordMessageSnapshot; + public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordMessageSnapshot;Ldev/kord/common/entity/DiscordMessage;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordMessageSnapshot; + public fun equals (Ljava/lang/Object;)Z + public final fun getMessage ()Ldev/kord/common/entity/DiscordMessage; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/kord/common/entity/DiscordMessageSnapshot$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/kord/common/entity/DiscordMessageSnapshot$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/kord/common/entity/DiscordMessageSnapshot; + 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/DiscordMessageSnapshot;)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/DiscordMessageSnapshot$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + public final class dev/kord/common/entity/DiscordMessageSticker { public static final field Companion Ldev/kord/common/entity/DiscordMessageSticker$Companion; public fun (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/MessageStickerType;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalInt;)V @@ -7342,6 +7373,32 @@ public final class dev/kord/common/entity/MessageReactionRemoveData$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public abstract class dev/kord/common/entity/MessageReferenceType { + public static final field Companion Ldev/kord/common/entity/MessageReferenceType$Companion; + public synthetic fun (ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun equals (Ljava/lang/Object;)Z + public final fun getValue ()I + public final fun hashCode ()I + public final fun toString ()Ljava/lang/String; +} + +public final class dev/kord/common/entity/MessageReferenceType$Companion { + public final fun from (I)Ldev/kord/common/entity/MessageReferenceType; + public final fun getEntries ()Ljava/util/List; + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/kord/common/entity/MessageReferenceType$Default : dev/kord/common/entity/MessageReferenceType { + public static final field INSTANCE Ldev/kord/common/entity/MessageReferenceType$Default; +} + +public final class dev/kord/common/entity/MessageReferenceType$Forward : dev/kord/common/entity/MessageReferenceType { + public static final field INSTANCE Ldev/kord/common/entity/MessageReferenceType$Forward; +} + +public final class dev/kord/common/entity/MessageReferenceType$Unknown : dev/kord/common/entity/MessageReferenceType { +} + public abstract class dev/kord/common/entity/MessageStickerType { public static final field Companion Ldev/kord/common/entity/MessageStickerType$Companion; public synthetic fun (ILkotlin/jvm/internal/DefaultConstructorMarker;)V diff --git a/common/api/common.klib.api b/common/api/common.klib.api index 9308b8f8f82..6ad03614022 100644 --- a/common/api/common.klib.api +++ b/common/api/common.klib.api @@ -3305,7 +3305,7 @@ final class dev.kord.common.entity/DiscordMentionedChannel { // dev.kord.common. } final class dev.kord.common.entity/DiscordMessage { // dev.kord.common.entity/DiscordMessage|null[0] - constructor (dev.kord.common.entity/Snowflake, dev.kord.common.entity/Snowflake, dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity/DiscordUser, dev.kord.common.entity.optional/Optional = ..., kotlin/String, kotlinx.datetime/Instant, kotlinx.datetime/Instant?, kotlin/Boolean, kotlin/Boolean, kotlin.collections/List, kotlin.collections/List, dev.kord.common.entity.optional/Optional> = ..., kotlin.collections/List, kotlin.collections/List, dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., kotlin/Boolean, dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity/MessageType, 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 = ..., 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/OptionalInt = ...) // dev.kord.common.entity/DiscordMessage.|(dev.kord.common.entity.Snowflake;dev.kord.common.entity.Snowflake;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.DiscordUser;dev.kord.common.entity.optional.Optional;kotlin.String;kotlinx.datetime.Instant;kotlinx.datetime.Instant?;kotlin.Boolean;kotlin.Boolean;kotlin.collections.List;kotlin.collections.List;dev.kord.common.entity.optional.Optional>;kotlin.collections.List;kotlin.collections.List;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;kotlin.Boolean;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.MessageType;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;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.OptionalInt){}[0] + constructor (dev.kord.common.entity/Snowflake, dev.kord.common.entity/Snowflake, dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity/DiscordUser, dev.kord.common.entity.optional/Optional = ..., kotlin/String, kotlinx.datetime/Instant, kotlinx.datetime/Instant?, kotlin/Boolean, kotlin/Boolean, kotlin.collections/List, kotlin.collections/List, dev.kord.common.entity.optional/Optional> = ..., kotlin.collections/List, kotlin.collections/List, dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., kotlin/Boolean, dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity/MessageType, 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> = ..., 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/OptionalInt = ...) // dev.kord.common.entity/DiscordMessage.|(dev.kord.common.entity.Snowflake;dev.kord.common.entity.Snowflake;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.DiscordUser;dev.kord.common.entity.optional.Optional;kotlin.String;kotlinx.datetime.Instant;kotlinx.datetime.Instant?;kotlin.Boolean;kotlin.Boolean;kotlin.collections.List;kotlin.collections.List;dev.kord.common.entity.optional.Optional>;kotlin.collections.List;kotlin.collections.List;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;kotlin.Boolean;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.MessageType;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>;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.OptionalInt){}[0] final val activity // dev.kord.common.entity/DiscordMessage.activity|{}activity[0] final fun (): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordMessage.activity.|(){}[0] @@ -3347,6 +3347,8 @@ final class dev.kord.common.entity/DiscordMessage { // dev.kord.common.entity/Di final fun (): kotlin.collections/List // dev.kord.common.entity/DiscordMessage.mentions.|(){}[0] final val messageReference // dev.kord.common.entity/DiscordMessage.messageReference|{}messageReference[0] final fun (): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordMessage.messageReference.|(){}[0] + final val messageSnapshots // dev.kord.common.entity/DiscordMessage.messageSnapshots|{}messageSnapshots[0] + final fun (): dev.kord.common.entity.optional/Optional> // dev.kord.common.entity/DiscordMessage.messageSnapshots.|(){}[0] final val nonce // dev.kord.common.entity/DiscordMessage.nonce|{}nonce[0] final fun (): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordMessage.nonce.|(){}[0] final val pinned // dev.kord.common.entity/DiscordMessage.pinned|{}pinned[0] @@ -3389,22 +3391,23 @@ final class dev.kord.common.entity/DiscordMessage { // dev.kord.common.entity/Di final fun component22(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordMessage.component22|component22(){}[0] final fun component23(): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.common.entity/DiscordMessage.component23|component23(){}[0] final fun component24(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordMessage.component24|component24(){}[0] - final fun component25(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordMessage.component25|component25(){}[0] - final fun component26(): dev.kord.common.entity.optional/Optional> // dev.kord.common.entity/DiscordMessage.component26|component26(){}[0] - final fun component27(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordMessage.component27|component27(){}[0] - final fun component28(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordMessage.component28|component28(){}[0] - final fun component29(): dev.kord.common.entity.optional/Optional> // dev.kord.common.entity/DiscordMessage.component29|component29(){}[0] + final fun component25(): dev.kord.common.entity.optional/Optional> // dev.kord.common.entity/DiscordMessage.component25|component25(){}[0] + final fun component26(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordMessage.component26|component26(){}[0] + final fun component27(): dev.kord.common.entity.optional/Optional> // dev.kord.common.entity/DiscordMessage.component27|component27(){}[0] + final fun component28(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordMessage.component28|component28(){}[0] + final fun component29(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordMessage.component29|component29(){}[0] final fun component3(): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.common.entity/DiscordMessage.component3|component3(){}[0] - final fun component30(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordMessage.component30|component30(){}[0] - final fun component31(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordMessage.component31|component31(){}[0] - final fun component32(): dev.kord.common.entity.optional/OptionalInt // dev.kord.common.entity/DiscordMessage.component32|component32(){}[0] + final fun component30(): dev.kord.common.entity.optional/Optional> // dev.kord.common.entity/DiscordMessage.component30|component30(){}[0] + final fun component31(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordMessage.component31|component31(){}[0] + final fun component32(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordMessage.component32|component32(){}[0] + final fun component33(): dev.kord.common.entity.optional/OptionalInt // dev.kord.common.entity/DiscordMessage.component33|component33(){}[0] final fun component4(): dev.kord.common.entity/DiscordUser // dev.kord.common.entity/DiscordMessage.component4|component4(){}[0] final fun component5(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordMessage.component5|component5(){}[0] final fun component6(): kotlin/String // dev.kord.common.entity/DiscordMessage.component6|component6(){}[0] final fun component7(): kotlinx.datetime/Instant // dev.kord.common.entity/DiscordMessage.component7|component7(){}[0] final fun component8(): kotlinx.datetime/Instant? // dev.kord.common.entity/DiscordMessage.component8|component8(){}[0] final fun component9(): kotlin/Boolean // dev.kord.common.entity/DiscordMessage.component9|component9(){}[0] - final fun copy(dev.kord.common.entity/Snowflake = ..., dev.kord.common.entity/Snowflake = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity/DiscordUser = ..., dev.kord.common.entity.optional/Optional = ..., kotlin/String = ..., kotlinx.datetime/Instant = ..., kotlinx.datetime/Instant? = ..., kotlin/Boolean = ..., kotlin/Boolean = ..., kotlin.collections/List = ..., kotlin.collections/List = ..., dev.kord.common.entity.optional/Optional> = ..., kotlin.collections/List = ..., kotlin.collections/List = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., kotlin/Boolean = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity/MessageType = ..., 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 = ..., 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/OptionalInt = ...): dev.kord.common.entity/DiscordMessage // dev.kord.common.entity/DiscordMessage.copy|copy(dev.kord.common.entity.Snowflake;dev.kord.common.entity.Snowflake;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.DiscordUser;dev.kord.common.entity.optional.Optional;kotlin.String;kotlinx.datetime.Instant;kotlinx.datetime.Instant?;kotlin.Boolean;kotlin.Boolean;kotlin.collections.List;kotlin.collections.List;dev.kord.common.entity.optional.Optional>;kotlin.collections.List;kotlin.collections.List;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;kotlin.Boolean;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.MessageType;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;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.OptionalInt){}[0] + final fun copy(dev.kord.common.entity/Snowflake = ..., dev.kord.common.entity/Snowflake = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity/DiscordUser = ..., dev.kord.common.entity.optional/Optional = ..., kotlin/String = ..., kotlinx.datetime/Instant = ..., kotlinx.datetime/Instant? = ..., kotlin/Boolean = ..., kotlin/Boolean = ..., kotlin.collections/List = ..., kotlin.collections/List = ..., dev.kord.common.entity.optional/Optional> = ..., kotlin.collections/List = ..., kotlin.collections/List = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., kotlin/Boolean = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity/MessageType = ..., 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> = ..., 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/OptionalInt = ...): dev.kord.common.entity/DiscordMessage // dev.kord.common.entity/DiscordMessage.copy|copy(dev.kord.common.entity.Snowflake;dev.kord.common.entity.Snowflake;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.DiscordUser;dev.kord.common.entity.optional.Optional;kotlin.String;kotlinx.datetime.Instant;kotlinx.datetime.Instant?;kotlin.Boolean;kotlin.Boolean;kotlin.collections.List;kotlin.collections.List;dev.kord.common.entity.optional.Optional>;kotlin.collections.List;kotlin.collections.List;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;kotlin.Boolean;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.MessageType;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>;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.OptionalInt){}[0] final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.common.entity/DiscordMessage.equals|equals(kotlin.Any?){}[0] final fun hashCode(): kotlin/Int // dev.kord.common.entity/DiscordMessage.hashCode|hashCode(){}[0] final fun toString(): kotlin/String // dev.kord.common.entity/DiscordMessage.toString|toString(){}[0] @@ -3461,7 +3464,7 @@ final class dev.kord.common.entity/DiscordMessageInteraction { // dev.kord.commo } final class dev.kord.common.entity/DiscordMessageReference { // dev.kord.common.entity/DiscordMessageReference|null[0] - constructor (dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/OptionalBoolean = ...) // dev.kord.common.entity/DiscordMessageReference.|(dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.OptionalBoolean){}[0] + constructor (dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/OptionalBoolean = ...) // dev.kord.common.entity/DiscordMessageReference.|(dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.OptionalBoolean){}[0] final val channelId // dev.kord.common.entity/DiscordMessageReference.channelId|{}channelId[0] final fun (): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.common.entity/DiscordMessageReference.channelId.|(){}[0] @@ -3471,12 +3474,15 @@ final class dev.kord.common.entity/DiscordMessageReference { // dev.kord.common. final fun (): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.common.entity/DiscordMessageReference.guildId.|(){}[0] final val id // dev.kord.common.entity/DiscordMessageReference.id|{}id[0] final fun (): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.common.entity/DiscordMessageReference.id.|(){}[0] + final val type // dev.kord.common.entity/DiscordMessageReference.type|{}type[0] + final fun (): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordMessageReference.type.|(){}[0] - final fun component1(): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.common.entity/DiscordMessageReference.component1|component1(){}[0] + final fun component1(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/DiscordMessageReference.component1|component1(){}[0] final fun component2(): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.common.entity/DiscordMessageReference.component2|component2(){}[0] final fun component3(): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.common.entity/DiscordMessageReference.component3|component3(){}[0] - final fun component4(): dev.kord.common.entity.optional/OptionalBoolean // dev.kord.common.entity/DiscordMessageReference.component4|component4(){}[0] - final fun copy(dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/OptionalBoolean = ...): dev.kord.common.entity/DiscordMessageReference // dev.kord.common.entity/DiscordMessageReference.copy|copy(dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.OptionalBoolean){}[0] + final fun component4(): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.common.entity/DiscordMessageReference.component4|component4(){}[0] + final fun component5(): dev.kord.common.entity.optional/OptionalBoolean // dev.kord.common.entity/DiscordMessageReference.component5|component5(){}[0] + final fun copy(dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/OptionalBoolean = ...): dev.kord.common.entity/DiscordMessageReference // dev.kord.common.entity/DiscordMessageReference.copy|copy(dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.OptionalBoolean){}[0] final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.common.entity/DiscordMessageReference.equals|equals(kotlin.Any?){}[0] final fun hashCode(): kotlin/Int // dev.kord.common.entity/DiscordMessageReference.hashCode|hashCode(){}[0] final fun toString(): kotlin/String // dev.kord.common.entity/DiscordMessageReference.toString|toString(){}[0] @@ -3491,10 +3497,38 @@ final class dev.kord.common.entity/DiscordMessageReference { // dev.kord.common. } final object Companion { // dev.kord.common.entity/DiscordMessageReference.Companion|null[0] + final val $childSerializers // dev.kord.common.entity/DiscordMessageReference.Companion.$childSerializers|{}$childSerializers[0] + final fun serializer(): kotlinx.serialization/KSerializer // dev.kord.common.entity/DiscordMessageReference.Companion.serializer|serializer(){}[0] } } +final class dev.kord.common.entity/DiscordMessageSnapshot { // dev.kord.common.entity/DiscordMessageSnapshot|null[0] + constructor (dev.kord.common.entity/DiscordMessage) // dev.kord.common.entity/DiscordMessageSnapshot.|(dev.kord.common.entity.DiscordMessage){}[0] + + final val message // dev.kord.common.entity/DiscordMessageSnapshot.message|{}message[0] + final fun (): dev.kord.common.entity/DiscordMessage // dev.kord.common.entity/DiscordMessageSnapshot.message.|(){}[0] + + final fun component1(): dev.kord.common.entity/DiscordMessage // dev.kord.common.entity/DiscordMessageSnapshot.component1|component1(){}[0] + final fun copy(dev.kord.common.entity/DiscordMessage = ...): dev.kord.common.entity/DiscordMessageSnapshot // dev.kord.common.entity/DiscordMessageSnapshot.copy|copy(dev.kord.common.entity.DiscordMessage){}[0] + final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.common.entity/DiscordMessageSnapshot.equals|equals(kotlin.Any?){}[0] + final fun hashCode(): kotlin/Int // dev.kord.common.entity/DiscordMessageSnapshot.hashCode|hashCode(){}[0] + final fun toString(): kotlin/String // dev.kord.common.entity/DiscordMessageSnapshot.toString|toString(){}[0] + + final object $serializer : kotlinx.serialization.internal/GeneratedSerializer { // dev.kord.common.entity/DiscordMessageSnapshot.$serializer|null[0] + final val descriptor // dev.kord.common.entity/DiscordMessageSnapshot.$serializer.descriptor|{}descriptor[0] + final fun (): kotlinx.serialization.descriptors/SerialDescriptor // dev.kord.common.entity/DiscordMessageSnapshot.$serializer.descriptor.|(){}[0] + + final fun childSerializers(): kotlin/Array> // dev.kord.common.entity/DiscordMessageSnapshot.$serializer.childSerializers|childSerializers(){}[0] + final fun deserialize(kotlinx.serialization.encoding/Decoder): dev.kord.common.entity/DiscordMessageSnapshot // dev.kord.common.entity/DiscordMessageSnapshot.$serializer.deserialize|deserialize(kotlinx.serialization.encoding.Decoder){}[0] + final fun serialize(kotlinx.serialization.encoding/Encoder, dev.kord.common.entity/DiscordMessageSnapshot) // dev.kord.common.entity/DiscordMessageSnapshot.$serializer.serialize|serialize(kotlinx.serialization.encoding.Encoder;dev.kord.common.entity.DiscordMessageSnapshot){}[0] + } + + final object Companion { // dev.kord.common.entity/DiscordMessageSnapshot.Companion|null[0] + final fun serializer(): kotlinx.serialization/KSerializer // dev.kord.common.entity/DiscordMessageSnapshot.Companion.serializer|serializer(){}[0] + } +} + final class dev.kord.common.entity/DiscordMessageSticker { // dev.kord.common.entity/DiscordMessageSticker|null[0] constructor (dev.kord.common.entity/Snowflake, dev.kord.common.entity.optional/OptionalSnowflake = ..., kotlin/String, kotlin/String?, dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity/MessageStickerType, dev.kord.common.entity.optional/OptionalBoolean = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/OptionalInt = ...) // dev.kord.common.entity/DiscordMessageSticker.|(dev.kord.common.entity.Snowflake;dev.kord.common.entity.optional.OptionalSnowflake;kotlin.String;kotlin.String?;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.MessageStickerType;dev.kord.common.entity.optional.OptionalBoolean;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.OptionalInt){}[0] @@ -8233,6 +8267,31 @@ sealed class dev.kord.common.entity/MessageFlag { // dev.kord.common.entity/Mess final object Urgent : dev.kord.common.entity/MessageFlag // dev.kord.common.entity/MessageFlag.Urgent|null[0] } +sealed class dev.kord.common.entity/MessageReferenceType { // dev.kord.common.entity/MessageReferenceType|null[0] + constructor (kotlin/Int) // dev.kord.common.entity/MessageReferenceType.|(kotlin.Int){}[0] + + final val value // dev.kord.common.entity/MessageReferenceType.value|{}value[0] + final fun (): kotlin/Int // dev.kord.common.entity/MessageReferenceType.value.|(){}[0] + + final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.common.entity/MessageReferenceType.equals|equals(kotlin.Any?){}[0] + final fun hashCode(): kotlin/Int // dev.kord.common.entity/MessageReferenceType.hashCode|hashCode(){}[0] + final fun toString(): kotlin/String // dev.kord.common.entity/MessageReferenceType.toString|toString(){}[0] + + final class Unknown : dev.kord.common.entity/MessageReferenceType // dev.kord.common.entity/MessageReferenceType.Unknown|null[0] + + final object Companion { // dev.kord.common.entity/MessageReferenceType.Companion|null[0] + final val entries // dev.kord.common.entity/MessageReferenceType.Companion.entries|{}entries[0] + final fun (): kotlin.collections/List // dev.kord.common.entity/MessageReferenceType.Companion.entries.|(){}[0] + + final fun from(kotlin/Int): dev.kord.common.entity/MessageReferenceType // dev.kord.common.entity/MessageReferenceType.Companion.from|from(kotlin.Int){}[0] + final fun serializer(): kotlinx.serialization/KSerializer // dev.kord.common.entity/MessageReferenceType.Companion.serializer|serializer(){}[0] + } + + final object Default : dev.kord.common.entity/MessageReferenceType // dev.kord.common.entity/MessageReferenceType.Default|null[0] + + final object Forward : dev.kord.common.entity/MessageReferenceType // dev.kord.common.entity/MessageReferenceType.Forward|null[0] +} + sealed class dev.kord.common.entity/MessageStickerType { // dev.kord.common.entity/MessageStickerType|null[0] constructor (kotlin/Int) // dev.kord.common.entity/MessageStickerType.|(kotlin.Int){}[0] diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageReferenceType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageReferenceType.kt new file mode 100644 index 00000000000..a2a6b18e529 --- /dev/null +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageReferenceType.kt @@ -0,0 +1,88 @@ +// 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 [MessageReferenceType]s in the + * [Discord Developer Documentation](https://discord.com/developers/docs/resources/message#message-reference-structure). + */ +@Serializable(with = MessageReferenceType.Serializer::class) +public sealed class MessageReferenceType( + /** + * The raw value used by Discord. + */ + public val `value`: Int, +) { + final override fun equals(other: Any?): Boolean = this === other || + (other is MessageReferenceType && this.value == other.value) + + final override fun hashCode(): Int = value.hashCode() + + final override fun toString(): String = + if (this is Unknown) "MessageReferenceType.Unknown(value=$value)" + else "MessageReferenceType.${this::class.simpleName}" + + /** + * An unknown [MessageReferenceType]. + * + * This is used as a fallback for [MessageReferenceType]s that haven't been added to Kord yet. + */ + public class Unknown internal constructor( + `value`: Int, + ) : MessageReferenceType(value) + + /** + * A standard reference used by replies. + */ + public object Default : MessageReferenceType(0) + + /** + * Reference used to point to a message at a point in time. + */ + public object Forward : MessageReferenceType(1) + + internal object Serializer : KSerializer { + override val descriptor: SerialDescriptor = + PrimitiveSerialDescriptor("dev.kord.common.entity.MessageReferenceType", + PrimitiveKind.INT) + + override fun serialize(encoder: Encoder, `value`: MessageReferenceType) { + encoder.encodeInt(value.value) + } + + override fun deserialize(decoder: Decoder): MessageReferenceType = from(decoder.decodeInt()) + } + + public companion object { + /** + * A [List] of all known [MessageReferenceType]s. + */ + public val entries: List by lazy(mode = PUBLICATION) { + listOf( + Default, + Forward, + ) + } + + /** + * Returns an instance of [MessageReferenceType] with [MessageReferenceType.value] equal to + * the specified [value]. + */ + public fun from(`value`: Int): MessageReferenceType = when (value) { + 0 -> Default + 1 -> Forward + else -> Unknown(value) + } + } +} diff --git a/common/src/commonMain/kotlin/entity/DiscordMessage.kt b/common/src/commonMain/kotlin/entity/DiscordMessage.kt index 6cd1a5bc853..d7247740c6a 100644 --- a/common/src/commonMain/kotlin/entity/DiscordMessage.kt +++ b/common/src/commonMain/kotlin/entity/DiscordMessage.kt @@ -121,6 +121,15 @@ ], ) +@file:Generate( + INT_KORD_ENUM, name = "MessageReferenceType", + docUrl = "https://discord.com/developers/docs/resources/message#message-reference-structure", + entries = [ + Entry("Default", intValue = 0, kDoc = "A standard reference used by replies."), + Entry("Forward", intValue = 1, kDoc = "Reference used to point to a message at a point in time."), + ] +) + package dev.kord.common.entity import dev.kord.common.entity.optional.Optional @@ -221,6 +230,7 @@ public data class DiscordMessage( val applicationId: OptionalSnowflake = OptionalSnowflake.Missing, @SerialName("message_reference") val messageReference: Optional = Optional.Missing(), + val messageSnapshots: Optional> = Optional.Missing(), val flags: Optional = Optional.Missing(), @SerialName("sticker_items") val stickers: Optional> = Optional.Missing(), @@ -376,6 +386,7 @@ public data class DiscordPartialMessage( @Serializable public data class DiscordMessageReference( + val type: Optional = Optional.Missing(), @SerialName("message_id") val id: OptionalSnowflake = OptionalSnowflake.Missing, @SerialName("channel_id") @@ -386,6 +397,9 @@ public data class DiscordMessageReference( val failIfNotExists: OptionalBoolean = OptionalBoolean.Missing ) +@Serializable +public data class DiscordMessageSnapshot(val message: DiscordMessage) + /** * A representation of a [Discord Channel Mention structure](https://discord.com/developers/docs/resources/channel#channel-mention-object-channel-mention-structure). * diff --git a/core/api/core.api b/core/api/core.api index 19c163b67c2..ae7b81c7ebb 100644 --- a/core/api/core.api +++ b/core/api/core.api @@ -4260,8 +4260,8 @@ public final class dev/kord/core/cache/data/MembersChunkData$Companion { public final class dev/kord/core/cache/data/MessageData { public static final field Companion Ldev/kord/core/cache/data/MessageData$Companion; - public fun (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/core/cache/data/UserData;Ljava/lang/String;Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;ZZLjava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/MessageType;Ldev/kord/common/entity/optional/Optional;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/OptionalInt;)V - public synthetic fun (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/core/cache/data/UserData;Ljava/lang/String;Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;ZZLjava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/MessageType;Ldev/kord/common/entity/optional/Optional;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/OptionalInt;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/core/cache/data/UserData;Ljava/lang/String;Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;ZZLjava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/MessageType;Ldev/kord/common/entity/optional/Optional;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/optional/OptionalInt;)V + public synthetic fun (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/core/cache/data/UserData;Ljava/lang/String;Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;ZZLjava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/MessageType;Ldev/kord/common/entity/optional/Optional;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/optional/OptionalInt;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/kord/common/entity/Snowflake; public final fun component10 ()Ljava/util/List; public final fun component11 ()Ljava/util/List; @@ -4285,15 +4285,16 @@ public final class dev/kord/core/cache/data/MessageData { public final fun component28 ()Ldev/kord/common/entity/optional/Optional; public final fun component29 ()Ldev/kord/common/entity/optional/Optional; public final fun component3 ()Ldev/kord/common/entity/optional/OptionalSnowflake; - public final fun component30 ()Ldev/kord/common/entity/optional/OptionalInt; + public final fun component30 ()Ldev/kord/common/entity/optional/Optional; + public final fun component31 ()Ldev/kord/common/entity/optional/OptionalInt; public final fun component4 ()Ldev/kord/core/cache/data/UserData; public final fun component5 ()Ljava/lang/String; public final fun component6 ()Lkotlinx/datetime/Instant; public final fun component7 ()Lkotlinx/datetime/Instant; public final fun component8 ()Z public final fun component9 ()Z - public final fun copy (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/core/cache/data/UserData;Ljava/lang/String;Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;ZZLjava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/MessageType;Ldev/kord/common/entity/optional/Optional;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/OptionalInt;)Ldev/kord/core/cache/data/MessageData; - public static synthetic fun copy$default (Ldev/kord/core/cache/data/MessageData;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/core/cache/data/UserData;Ljava/lang/String;Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;ZZLjava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/MessageType;Ldev/kord/common/entity/optional/Optional;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/OptionalInt;ILjava/lang/Object;)Ldev/kord/core/cache/data/MessageData; + public final fun copy (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/core/cache/data/UserData;Ljava/lang/String;Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;ZZLjava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/MessageType;Ldev/kord/common/entity/optional/Optional;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/optional/OptionalInt;)Ldev/kord/core/cache/data/MessageData; + public static synthetic fun copy$default (Ldev/kord/core/cache/data/MessageData;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/core/cache/data/UserData;Ljava/lang/String;Lkotlinx/datetime/Instant;Lkotlinx/datetime/Instant;ZZLjava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/MessageType;Ldev/kord/common/entity/optional/Optional;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/optional/OptionalInt;ILjava/lang/Object;)Ldev/kord/core/cache/data/MessageData; public fun equals (Ljava/lang/Object;)Z public final fun getActivity ()Ldev/kord/common/entity/optional/Optional; public final fun getApplication ()Ldev/kord/common/entity/optional/Optional; @@ -4314,6 +4315,7 @@ public final class dev/kord/core/cache/data/MessageData { public final fun getMentionedChannels ()Ldev/kord/common/entity/optional/Optional; public final fun getMentions ()Ljava/util/List; public final fun getMessageReference ()Ldev/kord/common/entity/optional/Optional; + public final fun getMessageSnapshots ()Ldev/kord/common/entity/optional/Optional; public final fun getNonce ()Ldev/kord/common/entity/optional/Optional; public final fun getPinned ()Z public final fun getPosition ()Ldev/kord/common/entity/optional/OptionalInt; @@ -4420,6 +4422,34 @@ public final class dev/kord/core/cache/data/MessageReferenceData$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class dev/kord/core/cache/data/MessageSnapshotData { + public static final field Companion Ldev/kord/core/cache/data/MessageSnapshotData$Companion; + public fun (Ldev/kord/core/cache/data/MessageData;)V + public final fun component1 ()Ldev/kord/core/cache/data/MessageData; + public final fun copy (Ldev/kord/core/cache/data/MessageData;)Ldev/kord/core/cache/data/MessageSnapshotData; + public static synthetic fun copy$default (Ldev/kord/core/cache/data/MessageSnapshotData;Ldev/kord/core/cache/data/MessageData;ILjava/lang/Object;)Ldev/kord/core/cache/data/MessageSnapshotData; + public fun equals (Ljava/lang/Object;)Z + public final fun getMessage ()Ldev/kord/core/cache/data/MessageData; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/kord/core/cache/data/MessageSnapshotData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/kord/core/cache/data/MessageSnapshotData$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/kord/core/cache/data/MessageSnapshotData; + 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/core/cache/data/MessageSnapshotData;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class dev/kord/core/cache/data/MessageSnapshotData$Companion { + public final fun from (Ldev/kord/common/entity/DiscordMessageSnapshot;)Ldev/kord/core/cache/data/MessageSnapshotData; + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + public final class dev/kord/core/cache/data/NotSerializable : kotlinx/serialization/KSerializer { public static final field INSTANCE Ldev/kord/core/cache/data/NotSerializable; public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; @@ -6583,6 +6613,7 @@ public final class dev/kord/core/entity/Message : dev/kord/core/behavior/Message public final fun getMentionedUsers ()Lkotlinx/coroutines/flow/Flow; public final fun getMentionsEveryone ()Z public final fun getMessageReference ()Ldev/kord/core/entity/MessageReference; + public final fun getMessageSnapshots ()Ljava/util/List; public final fun getPosition ()Ljava/lang/Integer; public final fun getReactions ()Ljava/util/Set; public fun getReactors (Ldev/kord/core/entity/ReactionEmoji;)Lkotlinx/coroutines/flow/Flow; @@ -6632,6 +6663,21 @@ public final class dev/kord/core/entity/MessageReference : dev/kord/core/KordObj public final fun getMessage ()Ldev/kord/core/behavior/MessageBehavior; } +public final class dev/kord/core/entity/MessageSnapshot : dev/kord/core/KordObject { + public fun (Ldev/kord/core/cache/data/MessageSnapshotData;Ldev/kord/core/Kord;)V + public final fun getAttachments ()Ljava/util/List; + public final fun getContent ()Ljava/lang/String; + public final fun getData ()Ldev/kord/core/cache/data/MessageSnapshotData; + public final fun getEditedTimestamp ()Lkotlinx/datetime/Instant; + public final fun getEmbeds ()Ljava/util/List; + public final fun getFlags ()Ldev/kord/common/entity/MessageFlags; + public fun getKord ()Ldev/kord/core/Kord; + public final fun getMentionRoles ()Ljava/util/List; + public final fun getMentions ()Ljava/util/List; + public final fun getTimestamp ()Lkotlinx/datetime/Instant; + public final fun getType ()Ldev/kord/common/entity/MessageType; +} + public final class dev/kord/core/entity/PartialApplication : dev/kord/core/entity/BaseApplication { public fun (Ldev/kord/core/cache/data/PartialApplicationData;Ldev/kord/core/Kord;Ldev/kord/core/supplier/EntitySupplier;)V public synthetic fun (Ldev/kord/core/cache/data/PartialApplicationData;Ldev/kord/core/Kord;Ldev/kord/core/supplier/EntitySupplier;ILkotlin/jvm/internal/DefaultConstructorMarker;)V diff --git a/core/api/core.klib.api b/core/api/core.klib.api index 1d39196ab5f..f54ac519794 100644 --- a/core/api/core.klib.api +++ b/core/api/core.klib.api @@ -4009,7 +4009,7 @@ final class dev.kord.core.cache.data/MembersChunkData { // dev.kord.core.cache.d } final class dev.kord.core.cache.data/MessageData { // dev.kord.core.cache.data/MessageData|null[0] - constructor (dev.kord.common.entity/Snowflake, dev.kord.common.entity/Snowflake, dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.core.cache.data/UserData, kotlin/String, kotlinx.datetime/Instant, kotlinx.datetime/Instant? = ..., kotlin/Boolean, kotlin/Boolean, kotlin.collections/List, kotlin.collections/List, dev.kord.common.entity.optional/Optional> = ..., kotlin.collections/List, kotlin.collections/List, dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., kotlin/Boolean, dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity/MessageType, 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 = ..., 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/OptionalInt = ...) // dev.kord.core.cache.data/MessageData.|(dev.kord.common.entity.Snowflake;dev.kord.common.entity.Snowflake;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.core.cache.data.UserData;kotlin.String;kotlinx.datetime.Instant;kotlinx.datetime.Instant?;kotlin.Boolean;kotlin.Boolean;kotlin.collections.List;kotlin.collections.List;dev.kord.common.entity.optional.Optional>;kotlin.collections.List;kotlin.collections.List;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;kotlin.Boolean;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.MessageType;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;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.OptionalInt){}[0] + constructor (dev.kord.common.entity/Snowflake, dev.kord.common.entity/Snowflake, dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.core.cache.data/UserData, kotlin/String, kotlinx.datetime/Instant, kotlinx.datetime/Instant? = ..., kotlin/Boolean, kotlin/Boolean, kotlin.collections/List, kotlin.collections/List, dev.kord.common.entity.optional/Optional> = ..., kotlin.collections/List, kotlin.collections/List, dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., kotlin/Boolean, dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity/MessageType, 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> = ..., 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/OptionalInt = ...) // dev.kord.core.cache.data/MessageData.|(dev.kord.common.entity.Snowflake;dev.kord.common.entity.Snowflake;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.core.cache.data.UserData;kotlin.String;kotlinx.datetime.Instant;kotlinx.datetime.Instant?;kotlin.Boolean;kotlin.Boolean;kotlin.collections.List;kotlin.collections.List;dev.kord.common.entity.optional.Optional>;kotlin.collections.List;kotlin.collections.List;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;kotlin.Boolean;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.MessageType;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>;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.OptionalInt){}[0] final val activity // dev.kord.core.cache.data/MessageData.activity|{}activity[0] final fun (): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/MessageData.activity.|(){}[0] @@ -4049,6 +4049,8 @@ final class dev.kord.core.cache.data/MessageData { // dev.kord.core.cache.data/M final fun (): kotlin.collections/List // dev.kord.core.cache.data/MessageData.mentions.|(){}[0] final val messageReference // dev.kord.core.cache.data/MessageData.messageReference|{}messageReference[0] final fun (): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/MessageData.messageReference.|(){}[0] + final val messageSnapshots // dev.kord.core.cache.data/MessageData.messageSnapshots|{}messageSnapshots[0] + final fun (): dev.kord.common.entity.optional/Optional> // dev.kord.core.cache.data/MessageData.messageSnapshots.|(){}[0] final val nonce // dev.kord.core.cache.data/MessageData.nonce|{}nonce[0] final fun (): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/MessageData.nonce.|(){}[0] final val pinned // dev.kord.core.cache.data/MessageData.pinned|{}pinned[0] @@ -4088,21 +4090,22 @@ final class dev.kord.core.cache.data/MessageData { // dev.kord.core.cache.data/M final fun component21(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/MessageData.component21|component21(){}[0] final fun component22(): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.core.cache.data/MessageData.component22|component22(){}[0] final fun component23(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/MessageData.component23|component23(){}[0] - final fun component24(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/MessageData.component24|component24(){}[0] - final fun component25(): dev.kord.common.entity.optional/Optional> // dev.kord.core.cache.data/MessageData.component25|component25(){}[0] - final fun component26(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/MessageData.component26|component26(){}[0] - final fun component27(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/MessageData.component27|component27(){}[0] - final fun component28(): dev.kord.common.entity.optional/Optional> // dev.kord.core.cache.data/MessageData.component28|component28(){}[0] - final fun component29(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/MessageData.component29|component29(){}[0] + final fun component24(): dev.kord.common.entity.optional/Optional> // dev.kord.core.cache.data/MessageData.component24|component24(){}[0] + final fun component25(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/MessageData.component25|component25(){}[0] + final fun component26(): dev.kord.common.entity.optional/Optional> // dev.kord.core.cache.data/MessageData.component26|component26(){}[0] + final fun component27(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/MessageData.component27|component27(){}[0] + final fun component28(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/MessageData.component28|component28(){}[0] + final fun component29(): dev.kord.common.entity.optional/Optional> // dev.kord.core.cache.data/MessageData.component29|component29(){}[0] final fun component3(): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.core.cache.data/MessageData.component3|component3(){}[0] - final fun component30(): dev.kord.common.entity.optional/OptionalInt // dev.kord.core.cache.data/MessageData.component30|component30(){}[0] + final fun component30(): dev.kord.common.entity.optional/Optional // dev.kord.core.cache.data/MessageData.component30|component30(){}[0] + final fun component31(): dev.kord.common.entity.optional/OptionalInt // dev.kord.core.cache.data/MessageData.component31|component31(){}[0] final fun component4(): dev.kord.core.cache.data/UserData // dev.kord.core.cache.data/MessageData.component4|component4(){}[0] final fun component5(): kotlin/String // dev.kord.core.cache.data/MessageData.component5|component5(){}[0] final fun component6(): kotlinx.datetime/Instant // dev.kord.core.cache.data/MessageData.component6|component6(){}[0] final fun component7(): kotlinx.datetime/Instant? // dev.kord.core.cache.data/MessageData.component7|component7(){}[0] final fun component8(): kotlin/Boolean // dev.kord.core.cache.data/MessageData.component8|component8(){}[0] final fun component9(): kotlin/Boolean // dev.kord.core.cache.data/MessageData.component9|component9(){}[0] - final fun copy(dev.kord.common.entity/Snowflake = ..., dev.kord.common.entity/Snowflake = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.core.cache.data/UserData = ..., kotlin/String = ..., kotlinx.datetime/Instant = ..., kotlinx.datetime/Instant? = ..., kotlin/Boolean = ..., kotlin/Boolean = ..., kotlin.collections/List = ..., kotlin.collections/List = ..., dev.kord.common.entity.optional/Optional> = ..., kotlin.collections/List = ..., kotlin.collections/List = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., kotlin/Boolean = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity/MessageType = ..., 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 = ..., 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/OptionalInt = ...): dev.kord.core.cache.data/MessageData // dev.kord.core.cache.data/MessageData.copy|copy(dev.kord.common.entity.Snowflake;dev.kord.common.entity.Snowflake;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.core.cache.data.UserData;kotlin.String;kotlinx.datetime.Instant;kotlinx.datetime.Instant?;kotlin.Boolean;kotlin.Boolean;kotlin.collections.List;kotlin.collections.List;dev.kord.common.entity.optional.Optional>;kotlin.collections.List;kotlin.collections.List;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;kotlin.Boolean;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.MessageType;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;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.OptionalInt){}[0] + final fun copy(dev.kord.common.entity/Snowflake = ..., dev.kord.common.entity/Snowflake = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.core.cache.data/UserData = ..., kotlin/String = ..., kotlinx.datetime/Instant = ..., kotlinx.datetime/Instant? = ..., kotlin/Boolean = ..., kotlin/Boolean = ..., kotlin.collections/List = ..., kotlin.collections/List = ..., dev.kord.common.entity.optional/Optional> = ..., kotlin.collections/List = ..., kotlin.collections/List = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., kotlin/Boolean = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity/MessageType = ..., 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> = ..., 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/OptionalInt = ...): dev.kord.core.cache.data/MessageData // dev.kord.core.cache.data/MessageData.copy|copy(dev.kord.common.entity.Snowflake;dev.kord.common.entity.Snowflake;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.core.cache.data.UserData;kotlin.String;kotlinx.datetime.Instant;kotlinx.datetime.Instant?;kotlin.Boolean;kotlin.Boolean;kotlin.collections.List;kotlin.collections.List;dev.kord.common.entity.optional.Optional>;kotlin.collections.List;kotlin.collections.List;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;kotlin.Boolean;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.MessageType;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>;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.OptionalInt){}[0] final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.core.cache.data/MessageData.equals|equals(kotlin.Any?){}[0] final fun hashCode(): kotlin/Int // dev.kord.core.cache.data/MessageData.hashCode|hashCode(){}[0] final fun plus(dev.kord.common.entity/DiscordPartialMessage): dev.kord.core.cache.data/MessageData // dev.kord.core.cache.data/MessageData.plus|plus(dev.kord.common.entity.DiscordPartialMessage){}[0] @@ -4197,6 +4200,33 @@ final class dev.kord.core.cache.data/MessageReferenceData { // dev.kord.core.cac } } +final class dev.kord.core.cache.data/MessageSnapshotData { // dev.kord.core.cache.data/MessageSnapshotData|null[0] + constructor (dev.kord.core.cache.data/MessageData) // dev.kord.core.cache.data/MessageSnapshotData.|(dev.kord.core.cache.data.MessageData){}[0] + + final val message // dev.kord.core.cache.data/MessageSnapshotData.message|{}message[0] + final fun (): dev.kord.core.cache.data/MessageData // dev.kord.core.cache.data/MessageSnapshotData.message.|(){}[0] + + final fun component1(): dev.kord.core.cache.data/MessageData // dev.kord.core.cache.data/MessageSnapshotData.component1|component1(){}[0] + final fun copy(dev.kord.core.cache.data/MessageData = ...): dev.kord.core.cache.data/MessageSnapshotData // dev.kord.core.cache.data/MessageSnapshotData.copy|copy(dev.kord.core.cache.data.MessageData){}[0] + final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.core.cache.data/MessageSnapshotData.equals|equals(kotlin.Any?){}[0] + final fun hashCode(): kotlin/Int // dev.kord.core.cache.data/MessageSnapshotData.hashCode|hashCode(){}[0] + final fun toString(): kotlin/String // dev.kord.core.cache.data/MessageSnapshotData.toString|toString(){}[0] + + final object $serializer : kotlinx.serialization.internal/GeneratedSerializer { // dev.kord.core.cache.data/MessageSnapshotData.$serializer|null[0] + final val descriptor // dev.kord.core.cache.data/MessageSnapshotData.$serializer.descriptor|{}descriptor[0] + final fun (): kotlinx.serialization.descriptors/SerialDescriptor // dev.kord.core.cache.data/MessageSnapshotData.$serializer.descriptor.|(){}[0] + + final fun childSerializers(): kotlin/Array> // dev.kord.core.cache.data/MessageSnapshotData.$serializer.childSerializers|childSerializers(){}[0] + final fun deserialize(kotlinx.serialization.encoding/Decoder): dev.kord.core.cache.data/MessageSnapshotData // dev.kord.core.cache.data/MessageSnapshotData.$serializer.deserialize|deserialize(kotlinx.serialization.encoding.Decoder){}[0] + final fun serialize(kotlinx.serialization.encoding/Encoder, dev.kord.core.cache.data/MessageSnapshotData) // dev.kord.core.cache.data/MessageSnapshotData.$serializer.serialize|serialize(kotlinx.serialization.encoding.Encoder;dev.kord.core.cache.data.MessageSnapshotData){}[0] + } + + final object Companion { // dev.kord.core.cache.data/MessageSnapshotData.Companion|null[0] + final fun from(dev.kord.common.entity/DiscordMessageSnapshot): dev.kord.core.cache.data/MessageSnapshotData // dev.kord.core.cache.data/MessageSnapshotData.Companion.from|from(dev.kord.common.entity.DiscordMessageSnapshot){}[0] + final fun serializer(): kotlinx.serialization/KSerializer // dev.kord.core.cache.data/MessageSnapshotData.Companion.serializer|serializer(){}[0] + } +} + final class dev.kord.core.cache.data/OptionData { // dev.kord.core.cache.data/OptionData|null[0] constructor (kotlin/String, 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.core.cache.data/OptionData.|(kotlin.String;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional>>;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.OptionalBoolean){}[0] @@ -7910,6 +7940,8 @@ final class dev.kord.core.entity/Message : dev.kord.core.behavior/MessageBehavio final fun (): kotlin/Boolean // dev.kord.core.entity/Message.mentionsEveryone.|(){}[0] final val messageReference // dev.kord.core.entity/Message.messageReference|{}messageReference[0] final fun (): dev.kord.core.entity/MessageReference? // dev.kord.core.entity/Message.messageReference.|(){}[0] + final val messageSnapshots // dev.kord.core.entity/Message.messageSnapshots|{}messageSnapshots[0] + final fun (): kotlin.collections/List? // dev.kord.core.entity/Message.messageSnapshots.|(){}[0] final val position // dev.kord.core.entity/Message.position|{}position[0] final fun (): kotlin/Int? // dev.kord.core.entity/Message.position.|(){}[0] final val reactions // dev.kord.core.entity/Message.reactions|{}reactions[0] @@ -7981,6 +8013,33 @@ final class dev.kord.core.entity/MessageReference : dev.kord.core/KordObject { / final fun (): dev.kord.core.behavior/MessageBehavior? // dev.kord.core.entity/MessageReference.message.|(){}[0] } +final class dev.kord.core.entity/MessageSnapshot : dev.kord.core/KordObject { // dev.kord.core.entity/MessageSnapshot|null[0] + constructor (dev.kord.core.cache.data/MessageSnapshotData, dev.kord.core/Kord) // dev.kord.core.entity/MessageSnapshot.|(dev.kord.core.cache.data.MessageSnapshotData;dev.kord.core.Kord){}[0] + + final val attachments // dev.kord.core.entity/MessageSnapshot.attachments|{}attachments[0] + final fun (): kotlin.collections/List // dev.kord.core.entity/MessageSnapshot.attachments.|(){}[0] + final val content // dev.kord.core.entity/MessageSnapshot.content|{}content[0] + final fun (): kotlin/String // dev.kord.core.entity/MessageSnapshot.content.|(){}[0] + final val data // dev.kord.core.entity/MessageSnapshot.data|{}data[0] + final fun (): dev.kord.core.cache.data/MessageSnapshotData // dev.kord.core.entity/MessageSnapshot.data.|(){}[0] + final val editedTimestamp // dev.kord.core.entity/MessageSnapshot.editedTimestamp|{}editedTimestamp[0] + final fun (): kotlinx.datetime/Instant? // dev.kord.core.entity/MessageSnapshot.editedTimestamp.|(){}[0] + final val embeds // dev.kord.core.entity/MessageSnapshot.embeds|{}embeds[0] + final fun (): kotlin.collections/List // dev.kord.core.entity/MessageSnapshot.embeds.|(){}[0] + final val flags // dev.kord.core.entity/MessageSnapshot.flags|{}flags[0] + final fun (): dev.kord.common.entity/MessageFlags? // dev.kord.core.entity/MessageSnapshot.flags.|(){}[0] + final val kord // dev.kord.core.entity/MessageSnapshot.kord|{}kord[0] + final fun (): dev.kord.core/Kord // dev.kord.core.entity/MessageSnapshot.kord.|(){}[0] + final val mentionRoles // dev.kord.core.entity/MessageSnapshot.mentionRoles|{}mentionRoles[0] + final fun (): kotlin.collections/List // dev.kord.core.entity/MessageSnapshot.mentionRoles.|(){}[0] + final val mentions // dev.kord.core.entity/MessageSnapshot.mentions|{}mentions[0] + final fun (): kotlin.collections/List // dev.kord.core.entity/MessageSnapshot.mentions.|(){}[0] + final val timestamp // dev.kord.core.entity/MessageSnapshot.timestamp|{}timestamp[0] + final fun (): kotlinx.datetime/Instant // dev.kord.core.entity/MessageSnapshot.timestamp.|(){}[0] + final val type // dev.kord.core.entity/MessageSnapshot.type|{}type[0] + final fun (): dev.kord.common.entity/MessageType // dev.kord.core.entity/MessageSnapshot.type.|(){}[0] +} + final class dev.kord.core.entity/PartialApplication : dev.kord.core.entity/BaseApplication { // dev.kord.core.entity/PartialApplication|null[0] constructor (dev.kord.core.cache.data/PartialApplicationData, dev.kord.core/Kord, dev.kord.core.supplier/EntitySupplier = ...) // dev.kord.core.entity/PartialApplication.|(dev.kord.core.cache.data.PartialApplicationData;dev.kord.core.Kord;dev.kord.core.supplier.EntitySupplier){}[0] diff --git a/core/src/commonMain/kotlin/cache/data/MessageData.kt b/core/src/commonMain/kotlin/cache/data/MessageData.kt index 6883ae3d39a..8e906b684ef 100644 --- a/core/src/commonMain/kotlin/cache/data/MessageData.kt +++ b/core/src/commonMain/kotlin/cache/data/MessageData.kt @@ -32,6 +32,7 @@ public data class MessageData( val application: Optional = Optional.Missing(), val applicationId: OptionalSnowflake = OptionalSnowflake.Missing, val messageReference: Optional = Optional.Missing(), + val messageSnapshots: Optional> = Optional.Missing(), val flags: Optional = Optional.Missing(), val stickers: Optional> = Optional.Missing(), val referencedMessage: Optional = Optional.Missing(), @@ -102,6 +103,7 @@ public data class MessageData( application, applicationId, messageReference, + messageSnapshots, flags, stickers = stickers, referencedMessage = referencedMessage, @@ -140,6 +142,7 @@ public data class MessageData( application, applicationId, messageReference.map { MessageReferenceData.from(it) }, + messageSnapshots.mapList { MessageSnapshotData.from(it) }, flags, stickers.mapList { StickerItemData.from(it) }, referencedMessage.mapNotNull { from(it) }, diff --git a/core/src/commonMain/kotlin/cache/data/PartialMessageData.kt b/core/src/commonMain/kotlin/cache/data/PartialMessageData.kt new file mode 100644 index 00000000000..4764c3f4b61 --- /dev/null +++ b/core/src/commonMain/kotlin/cache/data/PartialMessageData.kt @@ -0,0 +1,13 @@ +package dev.kord.core.cache.data + +import dev.kord.common.entity.DiscordMessageSnapshot +import kotlinx.serialization.Serializable + + +@Serializable +public data class MessageSnapshotData(val message: MessageData) { + public companion object { + public fun from(snapshot: DiscordMessageSnapshot): MessageSnapshotData = + MessageSnapshotData(MessageData.from(snapshot.message)) + } +} diff --git a/core/src/commonMain/kotlin/entity/Message.kt b/core/src/commonMain/kotlin/entity/Message.kt index 3669a148878..ba7ad81102d 100644 --- a/core/src/commonMain/kotlin/entity/Message.kt +++ b/core/src/commonMain/kotlin/entity/Message.kt @@ -23,13 +23,13 @@ import dev.kord.core.entity.component.ActionRowComponent import dev.kord.core.entity.interaction.ActionInteraction import dev.kord.core.entity.interaction.followup.FollowupMessage import dev.kord.core.exception.EntityNotFoundException +import dev.kord.core.hash import dev.kord.core.supplier.EntitySupplier import dev.kord.core.supplier.EntitySupplyStrategy import dev.kord.core.supplier.getChannelOf import dev.kord.core.supplier.getChannelOfOrNull import kotlinx.coroutines.flow.* import kotlinx.datetime.Instant -import dev.kord.core.hash /** * An instance of a [Discord Message][https://discord.com/developers/docs/resources/channel#message-object]. @@ -183,6 +183,13 @@ public class Message( */ public val messageReference: MessageReference? get() = data.messageReference.value?.let { MessageReference(it, kord) } + /** + * If this message is a [MessageReferenceType.Forward] this will contain snapshots of the original message. + */ + public val messageSnapshots: List? get() = data.messageSnapshots.value?.map { + MessageSnapshot(it, kord) + } + /** * The [Channels][Channel] specifically mentioned in this message. * diff --git a/core/src/commonMain/kotlin/entity/MessageReference.kt b/core/src/commonMain/kotlin/entity/MessageReference.kt index 538dd500825..0531da89afe 100644 --- a/core/src/commonMain/kotlin/entity/MessageReference.kt +++ b/core/src/commonMain/kotlin/entity/MessageReference.kt @@ -1,11 +1,18 @@ package dev.kord.core.entity +import dev.kord.common.entity.MessageFlags +import dev.kord.common.entity.MessageType +import dev.kord.common.entity.Snowflake import dev.kord.core.Kord import dev.kord.core.KordObject import dev.kord.core.behavior.GuildBehavior import dev.kord.core.behavior.MessageBehavior import dev.kord.core.behavior.channel.MessageChannelBehavior +import dev.kord.core.cache.data.EmbedData +import dev.kord.core.cache.data.MessageData import dev.kord.core.cache.data.MessageReferenceData +import dev.kord.core.cache.data.MessageSnapshotData +import kotlinx.datetime.Instant public class MessageReference(public val data: MessageReferenceData, override val kord: Kord) : KordObject { @@ -15,5 +22,17 @@ public class MessageReference(public val data: MessageReferenceData, override va public val message: MessageBehavior? get() = data.id.value?.let { MessageBehavior(channel.id, it, kord) } +} +public class MessageSnapshot(public val data: MessageSnapshotData, override val kord: Kord) : KordObject { + private val message: MessageData get() = data.message + public val type: MessageType get() = message.type + public val content: String get() = message.content + public val embeds: List get() = message.embeds + public val attachments: List get() = message.attachments.map { Attachment(it, kord) } + public val timestamp: Instant get() = message.timestamp + public val editedTimestamp: Instant? get() = message.editedTimestamp + public val flags: MessageFlags? get() = message.flags.value + public val mentions: List get() = message.mentions + public val mentionRoles: List get() = message.mentionRoles }