-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Currently QueueEndEvents are not serialized properly due to how https://github.com/topi314/LavaQueue/blob/master/protocol/src/commonMain/kotlin/com/github/topi314/lavaqueue/protocol/messages.kt#L9 is setup. This causes the op and type variables to not be sent in the message body to Lavalink clients.
I am no Kotlin expert, but I am guessing this is due to them being defined in the data class body as static properties.
@SerialName("ready")
@Serializable
data class QueueEndEvent(
val guildId: String
) {
val op: Message.Op = Message.Op.Event
val type: String = "QueueEndEvent"
}I personally solved the problem by just encoding the values as defaults instead, but there's probably a better way to go about doing this:
@SerialName("event")
@Serializable
data class QueueEndEvent(
val guildId: String,
@EncodeDefault
val op: Message.Op = Message.Op.Event,
@EncodeDefault
val type: String = "QueueEndEvent"
)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working