diff --git a/rest/api/rest.api b/rest/api/rest.api index bbf3e21893ad..a60c114ac21f 100644 --- a/rest/api/rest.api +++ b/rest/api/rest.api @@ -2422,11 +2422,13 @@ public final class dev/kord/rest/builder/scheduled_events/ScheduledEventModifyBu public final class dev/kord/rest/builder/stage/StageInstanceCreateBuilder : dev/kord/rest/builder/AuditRequestBuilder { public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;)V public final fun getChannelId ()Ldev/kord/common/entity/Snowflake; + public final fun getGuildScheduledEventId ()Ldev/kord/common/entity/Snowflake; public final fun getPrivacyLevel ()Ldev/kord/common/entity/StageInstancePrivacyLevel; public fun getReason ()Ljava/lang/String; public final fun getSendStartNotification ()Ljava/lang/Boolean; public final fun getTopic ()Ljava/lang/String; public final fun setChannelId (Ldev/kord/common/entity/Snowflake;)V + public final fun setGuildScheduledEventId (Ldev/kord/common/entity/Snowflake;)V public final fun setPrivacyLevel (Ldev/kord/common/entity/StageInstancePrivacyLevel;)V public fun setReason (Ljava/lang/String;)V public final fun setSendStartNotification (Ljava/lang/Boolean;)V @@ -5177,16 +5179,18 @@ public final class dev/kord/rest/json/request/ScheduledEventModifyRequest$Compan public final class dev/kord/rest/json/request/StageInstanceCreateRequest { public static final field Companion Ldev/kord/rest/json/request/StageInstanceCreateRequest$Companion; - public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;)V - public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;)V + public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/kord/common/entity/Snowflake; public final fun component2 ()Ljava/lang/String; public final fun component3 ()Ldev/kord/common/entity/optional/Optional; public final fun component4 ()Ldev/kord/common/entity/optional/OptionalBoolean; - public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;)Ldev/kord/rest/json/request/StageInstanceCreateRequest; - public static synthetic fun copy$default (Ldev/kord/rest/json/request/StageInstanceCreateRequest;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;ILjava/lang/Object;)Ldev/kord/rest/json/request/StageInstanceCreateRequest; + public final fun component5 ()Ldev/kord/common/entity/optional/OptionalSnowflake; + public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;)Ldev/kord/rest/json/request/StageInstanceCreateRequest; + public static synthetic fun copy$default (Ldev/kord/rest/json/request/StageInstanceCreateRequest;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;ILjava/lang/Object;)Ldev/kord/rest/json/request/StageInstanceCreateRequest; public fun equals (Ljava/lang/Object;)Z public final fun getChannelId ()Ldev/kord/common/entity/Snowflake; + public final fun getGuildScheduledEventId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public final fun getPrivacyLevel ()Ldev/kord/common/entity/optional/Optional; public final fun getSendStartNotification ()Ldev/kord/common/entity/optional/OptionalBoolean; public final fun getTopic ()Ljava/lang/String; diff --git a/rest/src/commonMain/kotlin/builder/stage/StageInstanceCreateBuilder.kt b/rest/src/commonMain/kotlin/builder/stage/StageInstanceCreateBuilder.kt index 6cf8786b44f2..cc89ebc6cf44 100644 --- a/rest/src/commonMain/kotlin/builder/stage/StageInstanceCreateBuilder.kt +++ b/rest/src/commonMain/kotlin/builder/stage/StageInstanceCreateBuilder.kt @@ -6,6 +6,7 @@ import dev.kord.common.entity.StageInstancePrivacyLevel import dev.kord.common.entity.StageInstancePrivacyLevel.GuildOnly import dev.kord.common.entity.optional.Optional import dev.kord.common.entity.optional.OptionalBoolean +import dev.kord.common.entity.optional.OptionalSnowflake import dev.kord.common.entity.optional.delegate.delegate import dev.kord.rest.builder.AuditRequestBuilder import dev.kord.rest.json.request.StageInstanceCreateRequest @@ -30,10 +31,16 @@ public class StageInstanceCreateBuilder( /** Notify @everyone that a Stage instance has started. */ public var sendStartNotification: Boolean? by ::_sendStartNotification.delegate() + private var _guildScheduledEventId: OptionalSnowflake = OptionalSnowflake.Missing + + /** The guild scheduled event associated with this Stage instance. */ + public var guildScheduledEventId: Snowflake? by ::_guildScheduledEventId.delegate() + override fun toRequest(): StageInstanceCreateRequest = StageInstanceCreateRequest( channelId, topic, _privacyLevel, _sendStartNotification, + _guildScheduledEventId, ) } diff --git a/rest/src/commonMain/kotlin/json/request/StageInstanceRequests.kt b/rest/src/commonMain/kotlin/json/request/StageInstanceRequests.kt index 8e13e004f339..16bc754722d5 100644 --- a/rest/src/commonMain/kotlin/json/request/StageInstanceRequests.kt +++ b/rest/src/commonMain/kotlin/json/request/StageInstanceRequests.kt @@ -4,6 +4,7 @@ import dev.kord.common.entity.Snowflake import dev.kord.common.entity.StageInstancePrivacyLevel import dev.kord.common.entity.optional.Optional import dev.kord.common.entity.optional.OptionalBoolean +import dev.kord.common.entity.optional.OptionalSnowflake import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @@ -16,6 +17,8 @@ public data class StageInstanceCreateRequest( val privacyLevel: Optional = Optional.Missing(), @SerialName("send_start_notification") val sendStartNotification: OptionalBoolean = OptionalBoolean.Missing, + @SerialName("guild_scheduled_event_id") + val guildScheduledEventId: OptionalSnowflake = OptionalSnowflake.Missing, ) @Serializable