From 21da8f5781e0d3d8c509a316ca04485c14f2ede2 Mon Sep 17 00:00:00 2001 From: topi314 Date: Mon, 10 Mar 2025 09:10:05 +0100 Subject: [PATCH] fix queue end event op & type not being serialized --- .../github/topi314/lavaqueue/protocol/messages.kt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/protocol/src/commonMain/kotlin/com/github/topi314/lavaqueue/protocol/messages.kt b/protocol/src/commonMain/kotlin/com/github/topi314/lavaqueue/protocol/messages.kt index 0963be7..0025b21 100644 --- a/protocol/src/commonMain/kotlin/com/github/topi314/lavaqueue/protocol/messages.kt +++ b/protocol/src/commonMain/kotlin/com/github/topi314/lavaqueue/protocol/messages.kt @@ -6,9 +6,15 @@ import kotlinx.serialization.Serializable @SerialName("ready") @Serializable -data class QueueEndEvent( +@Suppress("DataClassPrivateConstructor") +data class QueueEndEvent private constructor( + val op: Message.Op, + val type: String, val guildId: String ) { - val op: Message.Op = Message.Op.Event - val type: String = "QueueEndEvent" + constructor(guildId: String) : this( + Message.Op.Event, + "QueueEndEvent", + guildId, + ) } \ No newline at end of file