Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add StageInstanceCreateRequest.guildScheduledEventId #893

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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