Skip to content

Commit

Permalink
Add StageInstanceCreateRequest.guildScheduledEventId (#893)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukellmann authored Nov 22, 2023
1 parent f68ce8c commit 242a24c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
12 changes: 8 additions & 4 deletions rest/api/rest.api
Original file line number Diff line number Diff line change
Expand Up @@ -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 <init> (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
Expand Down Expand Up @@ -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 <init> (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;)V
public synthetic fun <init> (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 <init> (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 <init> (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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -16,6 +17,8 @@ public data class StageInstanceCreateRequest(
val privacyLevel: Optional<StageInstancePrivacyLevel> = Optional.Missing(),
@SerialName("send_start_notification")
val sendStartNotification: OptionalBoolean = OptionalBoolean.Missing,
@SerialName("guild_scheduled_event_id")
val guildScheduledEventId: OptionalSnowflake = OptionalSnowflake.Missing,
)

@Serializable
Expand Down

0 comments on commit 242a24c

Please sign in to comment.