diff --git a/common/api/common.api b/common/api/common.api index 8512985a5d8..b5660596b21 100644 --- a/common/api/common.api +++ b/common/api/common.api @@ -8774,7 +8774,7 @@ public final class dev/kord/common/entity/WebhookType$Unknown : dev/kord/common/ public abstract class dev/kord/common/entity/optional/Optional { public static final field Companion Ldev/kord/common/entity/optional/Optional$Companion; - public fun getValue ()Ljava/lang/Object; + public abstract fun getValue ()Ljava/lang/Object; } public final class dev/kord/common/entity/optional/Optional$Companion { @@ -8786,32 +8786,30 @@ public final class dev/kord/common/entity/optional/Optional$Companion { } public final class dev/kord/common/entity/optional/Optional$Missing : dev/kord/common/entity/optional/Optional { - public static final field Companion Ldev/kord/common/entity/optional/Optional$Missing$Companion; + public static final field INSTANCE Ldev/kord/common/entity/optional/Optional$Missing; public fun equals (Ljava/lang/Object;)Z - public fun getValue ()Ljava/lang/Object; + public synthetic fun getValue ()Ljava/lang/Object; + public fun getValue ()Ljava/lang/Void; public fun hashCode ()I - public fun toString ()Ljava/lang/String; -} - -public final class dev/kord/common/entity/optional/Optional$Missing$Companion { public final fun invoke ()Ldev/kord/common/entity/optional/Optional$Missing; + public fun toString ()Ljava/lang/String; } public final class dev/kord/common/entity/optional/Optional$Null : dev/kord/common/entity/optional/Optional { - public static final field Companion Ldev/kord/common/entity/optional/Optional$Null$Companion; + public static final field INSTANCE Ldev/kord/common/entity/optional/Optional$Null; public fun equals (Ljava/lang/Object;)Z - public fun getValue ()Ljava/lang/Object; + public synthetic fun getValue ()Ljava/lang/Object; + public fun getValue ()Ljava/lang/Void; public fun hashCode ()I - public fun toString ()Ljava/lang/String; -} - -public final class dev/kord/common/entity/optional/Optional$Null$Companion { public final fun invoke ()Ldev/kord/common/entity/optional/Optional$Null; + public fun toString ()Ljava/lang/String; } public final class dev/kord/common/entity/optional/Optional$Value : dev/kord/common/entity/optional/Optional { public fun (Ljava/lang/Object;)V public final fun component1 ()Ljava/lang/Object; + public final fun copy (Ljava/lang/Object;)Ldev/kord/common/entity/optional/Optional$Value; + public static synthetic fun copy$default (Ldev/kord/common/entity/optional/Optional$Value;Ljava/lang/Object;ILjava/lang/Object;)Ldev/kord/common/entity/optional/Optional$Value; public fun equals (Ljava/lang/Object;)Z public fun getValue ()Ljava/lang/Object; public fun hashCode ()I @@ -8833,6 +8831,8 @@ public final class dev/kord/common/entity/optional/OptionalBoolean$Companion { public final class dev/kord/common/entity/optional/OptionalBoolean$Missing : dev/kord/common/entity/optional/OptionalBoolean { public static final field INSTANCE Ldev/kord/common/entity/optional/OptionalBoolean$Missing; + public fun equals (Ljava/lang/Object;)Z + public fun hashCode ()I public fun toString ()Ljava/lang/String; } @@ -8865,6 +8865,8 @@ public final class dev/kord/common/entity/optional/OptionalInt$Companion { public final class dev/kord/common/entity/optional/OptionalInt$Missing : dev/kord/common/entity/optional/OptionalInt { public static final field INSTANCE Ldev/kord/common/entity/optional/OptionalInt$Missing; + public fun equals (Ljava/lang/Object;)Z + public fun hashCode ()I public fun toString ()Ljava/lang/String; } @@ -8926,6 +8928,8 @@ public final class dev/kord/common/entity/optional/OptionalLong$Companion { public final class dev/kord/common/entity/optional/OptionalLong$Missing : dev/kord/common/entity/optional/OptionalLong { public static final field INSTANCE Ldev/kord/common/entity/optional/OptionalLong$Missing; + public fun equals (Ljava/lang/Object;)Z + public fun hashCode ()I public fun toString ()Ljava/lang/String; } @@ -8958,6 +8962,8 @@ public final class dev/kord/common/entity/optional/OptionalSnowflake$Companion { public final class dev/kord/common/entity/optional/OptionalSnowflake$Missing : dev/kord/common/entity/optional/OptionalSnowflake { public static final field INSTANCE Ldev/kord/common/entity/optional/OptionalSnowflake$Missing; + public fun equals (Ljava/lang/Object;)Z + public fun hashCode ()I public fun toString ()Ljava/lang/String; } diff --git a/common/api/common.klib.api b/common/api/common.klib.api index bda19192188..a3550774c52 100644 --- a/common/api/common.klib.api +++ b/common/api/common.klib.api @@ -5627,46 +5627,43 @@ sealed class <#A: kotlin/Any?> dev.kord.common.entity/AuditLogChangeKey { // dev open fun toString(): kotlin/String // dev.kord.common.entity/AuditLogChangeKey.toString|toString(){}[0] } sealed class <#A: out kotlin/Any?> dev.kord.common.entity.optional/Optional { // dev.kord.common.entity.optional/Optional|null[0] + abstract val value // dev.kord.common.entity.optional/Optional.value|{}value[0] + abstract fun (): #A? // dev.kord.common.entity.optional/Optional.value.|(){}[0] constructor () // dev.kord.common.entity.optional/Optional.|(){}[0] final class <#A1: kotlin/Any> Value : dev.kord.common.entity.optional/Optional<#A1> { // dev.kord.common.entity.optional/Optional.Value|null[0] constructor (#A1) // dev.kord.common.entity.optional/Optional.Value.|(1:0){}[0] final fun component1(): #A1 // dev.kord.common.entity.optional/Optional.Value.component1|component1(){}[0] + final fun copy(#A1 =...): dev.kord.common.entity.optional/Optional.Value<#A1> // dev.kord.common.entity.optional/Optional.Value.copy|copy(1:0){}[0] final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.common.entity.optional/Optional.Value.equals|equals(kotlin.Any?){}[0] final fun hashCode(): kotlin/Int // dev.kord.common.entity.optional/Optional.Value.hashCode|hashCode(){}[0] final fun toString(): kotlin/String // dev.kord.common.entity.optional/Optional.Value.toString|toString(){}[0] final val value // dev.kord.common.entity.optional/Optional.Value.value|{}value[0] final fun (): #A1 // dev.kord.common.entity.optional/Optional.Value.value.|(){}[0] } - final class <#A1: out kotlin/Any?> Missing : dev.kord.common.entity.optional/Optional<#A1> { // dev.kord.common.entity.optional/Optional.Missing|null[0] + final object Companion : kotlinx.serialization.internal/SerializerFactory { // dev.kord.common.entity.optional/Optional.Companion|null[0] + final fun <#A2: kotlin/Any> invoke(#A2): dev.kord.common.entity.optional/Optional.Value<#A2> // dev.kord.common.entity.optional/Optional.Companion.invoke|invoke(0:0){0§}[0] + final fun <#A2: kotlin/Any> invoke(#A2?): dev.kord.common.entity.optional/Optional<#A2?> // dev.kord.common.entity.optional/Optional.Companion.invoke|invoke(0:0?){0§}[0] + final fun <#A2: kotlin/Any?, #B2: kotlin.collections/Collection<#A2>> missingOnEmpty(#B2): dev.kord.common.entity.optional/Optional<#B2> // dev.kord.common.entity.optional/Optional.Companion.missingOnEmpty|missingOnEmpty(0:1){0§;1§>}[0] + final fun <#A2: kotlin/Any?> serializer(kotlinx.serialization/KSerializer<#A2>): kotlinx.serialization/KSerializer> // dev.kord.common.entity.optional/Optional.Companion.serializer|serializer(kotlinx.serialization.KSerializer<0:0>){0§}[0] + final fun invoke(): dev.kord.common.entity.optional/Optional.Missing // dev.kord.common.entity.optional/Optional.Companion.invoke|invoke(){}[0] + final fun serializer(kotlin/Array>...): kotlinx.serialization/KSerializer<*> // dev.kord.common.entity.optional/Optional.Companion.serializer|serializer(kotlin.Array>...){}[0] + } + final object Missing : dev.kord.common.entity.optional/Optional { // dev.kord.common.entity.optional/Optional.Missing|null[0] final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.common.entity.optional/Optional.Missing.equals|equals(kotlin.Any?){}[0] final fun hashCode(): kotlin/Int // dev.kord.common.entity.optional/Optional.Missing.hashCode|hashCode(){}[0] + final fun invoke(): dev.kord.common.entity.optional/Optional.Missing // dev.kord.common.entity.optional/Optional.Missing.invoke|invoke(){}[0] final fun toString(): kotlin/String // dev.kord.common.entity.optional/Optional.Missing.toString|toString(){}[0] - final object Companion { // dev.kord.common.entity.optional/Optional.Missing.Companion|null[0] - final fun <#A3: kotlin/Any> invoke(): dev.kord.common.entity.optional/Optional.Missing<#A3> // dev.kord.common.entity.optional/Optional.Missing.Companion.invoke|invoke(){0§}[0] - } final val value // dev.kord.common.entity.optional/Optional.Missing.value|{}value[0] - final fun (): #A1? // dev.kord.common.entity.optional/Optional.Missing.value.|(){}[0] + final fun (): kotlin/Nothing? // dev.kord.common.entity.optional/Optional.Missing.value.|(){}[0] } - final class <#A1: out kotlin/Any?> Null : dev.kord.common.entity.optional/Optional<#A1?> { // dev.kord.common.entity.optional/Optional.Null|null[0] + final object Null : dev.kord.common.entity.optional/Optional { // dev.kord.common.entity.optional/Optional.Null|null[0] final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.common.entity.optional/Optional.Null.equals|equals(kotlin.Any?){}[0] final fun hashCode(): kotlin/Int // dev.kord.common.entity.optional/Optional.Null.hashCode|hashCode(){}[0] + final fun invoke(): dev.kord.common.entity.optional/Optional.Null // dev.kord.common.entity.optional/Optional.Null.invoke|invoke(){}[0] final fun toString(): kotlin/String // dev.kord.common.entity.optional/Optional.Null.toString|toString(){}[0] - final object Companion { // dev.kord.common.entity.optional/Optional.Null.Companion|null[0] - final fun <#A3: kotlin/Any> invoke(): dev.kord.common.entity.optional/Optional.Null<#A3> // dev.kord.common.entity.optional/Optional.Null.Companion.invoke|invoke(){0§}[0] - } final val value // dev.kord.common.entity.optional/Optional.Null.value|{}value[0] - final fun (): #A1? // dev.kord.common.entity.optional/Optional.Null.value.|(){}[0] - } - final object Companion : kotlinx.serialization.internal/SerializerFactory { // dev.kord.common.entity.optional/Optional.Companion|null[0] - final fun <#A2: kotlin/Any> invoke(#A2): dev.kord.common.entity.optional/Optional.Value<#A2> // dev.kord.common.entity.optional/Optional.Companion.invoke|invoke(0:0){0§}[0] - final fun <#A2: kotlin/Any> invoke(#A2?): dev.kord.common.entity.optional/Optional<#A2?> // dev.kord.common.entity.optional/Optional.Companion.invoke|invoke(0:0?){0§}[0] - final fun <#A2: kotlin/Any> invoke(): dev.kord.common.entity.optional/Optional.Missing<#A2> // dev.kord.common.entity.optional/Optional.Companion.invoke|invoke(){0§}[0] - final fun <#A2: kotlin/Any?, #B2: kotlin.collections/Collection<#A2>> missingOnEmpty(#B2): dev.kord.common.entity.optional/Optional<#B2> // dev.kord.common.entity.optional/Optional.Companion.missingOnEmpty|missingOnEmpty(0:1){0§;1§>}[0] - final fun <#A2: kotlin/Any?> serializer(kotlinx.serialization/KSerializer<#A2>): kotlinx.serialization/KSerializer> // dev.kord.common.entity.optional/Optional.Companion.serializer|serializer(kotlinx.serialization.KSerializer<0:0>){0§}[0] - final fun serializer(kotlin/Array>...): kotlinx.serialization/KSerializer<*> // dev.kord.common.entity.optional/Optional.Companion.serializer|serializer(kotlin.Array>...){}[0] + final fun (): kotlin/Nothing? // dev.kord.common.entity.optional/Optional.Null.value.|(){}[0] } - open val value // dev.kord.common.entity.optional/Optional.value|{}value[0] - open fun (): #A? // dev.kord.common.entity.optional/Optional.value.|(){}[0] } sealed class <#A: out kotlin/Any?> dev.kord.common.entity/CommandArgument : dev.kord.common.entity/Option { // dev.kord.common.entity/CommandArgument|null[0] abstract val focused // dev.kord.common.entity/CommandArgument.focused|{}focused[0] @@ -5877,6 +5874,8 @@ sealed class dev.kord.common.entity.optional/OptionalBoolean { // dev.kord.commo final fun serializer(): kotlinx.serialization/KSerializer // dev.kord.common.entity.optional/OptionalBoolean.Companion.serializer|serializer(){}[0] } final object Missing : dev.kord.common.entity.optional/OptionalBoolean { // dev.kord.common.entity.optional/OptionalBoolean.Missing|null[0] + final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.common.entity.optional/OptionalBoolean.Missing.equals|equals(kotlin.Any?){}[0] + final fun hashCode(): kotlin/Int // dev.kord.common.entity.optional/OptionalBoolean.Missing.hashCode|hashCode(){}[0] final fun toString(): kotlin/String // dev.kord.common.entity.optional/OptionalBoolean.Missing.toString|toString(){}[0] } final val asNullable // dev.kord.common.entity.optional/OptionalBoolean.asNullable|{}asNullable[0] @@ -5902,6 +5901,8 @@ sealed class dev.kord.common.entity.optional/OptionalInt { // dev.kord.common.en final fun serializer(): kotlinx.serialization/KSerializer // dev.kord.common.entity.optional/OptionalInt.Companion.serializer|serializer(){}[0] } final object Missing : dev.kord.common.entity.optional/OptionalInt { // dev.kord.common.entity.optional/OptionalInt.Missing|null[0] + final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.common.entity.optional/OptionalInt.Missing.equals|equals(kotlin.Any?){}[0] + final fun hashCode(): kotlin/Int // dev.kord.common.entity.optional/OptionalInt.Missing.hashCode|hashCode(){}[0] final fun toString(): kotlin/String // dev.kord.common.entity.optional/OptionalInt.Missing.toString|toString(){}[0] } final val asNullable // dev.kord.common.entity.optional/OptionalInt.asNullable|{}asNullable[0] @@ -5925,6 +5926,8 @@ sealed class dev.kord.common.entity.optional/OptionalLong { // dev.kord.common.e final fun serializer(): kotlinx.serialization/KSerializer // dev.kord.common.entity.optional/OptionalLong.Companion.serializer|serializer(){}[0] } final object Missing : dev.kord.common.entity.optional/OptionalLong { // dev.kord.common.entity.optional/OptionalLong.Missing|null[0] + final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.common.entity.optional/OptionalLong.Missing.equals|equals(kotlin.Any?){}[0] + final fun hashCode(): kotlin/Int // dev.kord.common.entity.optional/OptionalLong.Missing.hashCode|hashCode(){}[0] final fun toString(): kotlin/String // dev.kord.common.entity.optional/OptionalLong.Missing.toString|toString(){}[0] } final val asNullable // dev.kord.common.entity.optional/OptionalLong.asNullable|{}asNullable[0] @@ -5949,6 +5952,8 @@ sealed class dev.kord.common.entity.optional/OptionalSnowflake { // dev.kord.com final fun serializer(): kotlinx.serialization/KSerializer // dev.kord.common.entity.optional/OptionalSnowflake.Companion.serializer|serializer(){}[0] } final object Missing : dev.kord.common.entity.optional/OptionalSnowflake { // dev.kord.common.entity.optional/OptionalSnowflake.Missing|null[0] + final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.common.entity.optional/OptionalSnowflake.Missing.equals|equals(kotlin.Any?){}[0] + final fun hashCode(): kotlin/Int // dev.kord.common.entity.optional/OptionalSnowflake.Missing.hashCode|hashCode(){}[0] final fun toString(): kotlin/String // dev.kord.common.entity.optional/OptionalSnowflake.Missing.toString|toString(){}[0] } final val asOptional // dev.kord.common.entity.optional/OptionalSnowflake.asOptional|{}asOptional[0] diff --git a/common/src/commonMain/kotlin/entity/ApplicationRoleConnectionMetadata.kt b/common/src/commonMain/kotlin/entity/ApplicationRoleConnectionMetadata.kt index 8215628026a..13a5b8e1455 100644 --- a/common/src/commonMain/kotlin/entity/ApplicationRoleConnectionMetadata.kt +++ b/common/src/commonMain/kotlin/entity/ApplicationRoleConnectionMetadata.kt @@ -59,8 +59,8 @@ public data class DiscordApplicationRoleConnectionMetadata( val key: String, val name: String, @SerialName("name_localizations") - val nameLocalizations: Optional> = Optional.Missing(), + val nameLocalizations: Optional> = Optional.Missing, val description: String, @SerialName("description_localizations") - val descriptionLocalizations: Optional> = Optional.Missing(), + val descriptionLocalizations: Optional> = Optional.Missing, ) diff --git a/common/src/commonMain/kotlin/entity/AuditLog.kt b/common/src/commonMain/kotlin/entity/AuditLog.kt index 390c0b06042..7539ee28f1b 100644 --- a/common/src/commonMain/kotlin/entity/AuditLog.kt +++ b/common/src/commonMain/kotlin/entity/AuditLog.kt @@ -106,14 +106,14 @@ public data class DiscordAuditLog( public data class DiscordAuditLogEntry( @SerialName("target_id") val targetId: Snowflake?, - val changes: Optional>> = Optional.Missing(), + val changes: Optional>> = Optional.Missing, @SerialName("user_id") val userId: Snowflake?, val id: Snowflake, @SerialName("action_type") val actionType: AuditLogEvent, - val options: Optional = Optional.Missing(), - val reason: Optional = Optional.Missing(), + val options: Optional = Optional.Missing, + val reason: Optional = Optional.Missing, ) { @Suppress("UNCHECKED_CAST") @@ -127,21 +127,21 @@ public data class AuditLogEntryOptionalInfo( @SerialName("application_id") val applicationId: OptionalSnowflake = OptionalSnowflake.Missing, @SerialName("auto_moderation_rule_name") - val autoModerationRuleName: Optional = Optional.Missing(), + val autoModerationRuleName: Optional = Optional.Missing, @SerialName("auto_moderation_rule_trigger_type") - val autoModerationRuleTriggerType: Optional = Optional.Missing(), + val autoModerationRuleTriggerType: Optional = Optional.Missing, /* Do not trust the docs: 2020-11-12 field is described as present but is in fact optional */ @SerialName("delete_member_days") - val deleteMemberDays: Optional = Optional.Missing(), + val deleteMemberDays: Optional = Optional.Missing, /* Do not trust the docs: 2020-11-12 field is described as present but is in fact optional */ @SerialName("members_removed") - val membersRemoved: Optional = Optional.Missing(), + val membersRemoved: Optional = Optional.Missing, /* Do not trust the docs: 2020-11-12 field is described as present but is in fact optional @@ -158,7 +158,7 @@ public data class AuditLogEntryOptionalInfo( Do not trust the docs: 2020-11-12 field is described as present but is in fact optional */ - val count: Optional = Optional.Missing(), + val count: Optional = Optional.Missing, /* Do not trust the docs: 2020-11-12 field is described as present but is in fact optional @@ -168,15 +168,15 @@ public data class AuditLogEntryOptionalInfo( Do not trust the docs: 2020-11-12 field is described as present but is in fact optional */ - val type: Optional = Optional.Missing(), + val type: Optional = Optional.Missing, /* Do not trust the docs: 2020-11-12 field is described as present but is in fact optional */ @SerialName("role_name") - val roleName: Optional = Optional.Missing(), + val roleName: Optional = Optional.Missing, @SerialName("integration_type") - val integrationType: Optional = Optional.Missing(), + val integrationType: Optional = Optional.Missing, ) @Serializable(with = AuditLogChange.Serializer::class) diff --git a/common/src/commonMain/kotlin/entity/AutoModeration.kt b/common/src/commonMain/kotlin/entity/AutoModeration.kt index c554d4296ec..bac5ba653a5 100644 --- a/common/src/commonMain/kotlin/entity/AutoModeration.kt +++ b/common/src/commonMain/kotlin/entity/AutoModeration.kt @@ -93,12 +93,12 @@ public data class DiscordAutoModerationRule( @Serializable public data class DiscordAutoModerationRuleTriggerMetadata( @SerialName("keyword_filter") - val keywordFilter: Optional> = Optional.Missing(), + val keywordFilter: Optional> = Optional.Missing, @SerialName("regex_patterns") - val regexPatterns: Optional> = Optional.Missing(), - val presets: Optional> = Optional.Missing(), + val regexPatterns: Optional> = Optional.Missing, + val presets: Optional> = Optional.Missing, @SerialName("allow_list") - val allowList: Optional> = Optional.Missing(), + val allowList: Optional> = Optional.Missing, @SerialName("mention_total_limit") val mentionTotalLimit: OptionalInt = OptionalInt.Missing, @SerialName("mention_raid_protection_enabled") @@ -108,7 +108,7 @@ public data class DiscordAutoModerationRuleTriggerMetadata( @Serializable public data class DiscordAutoModerationAction( val type: AutoModerationActionType, - val metadata: Optional = Optional.Missing(), + val metadata: Optional = Optional.Missing, ) @Serializable @@ -116,7 +116,7 @@ public data class DiscordAutoModerationActionMetadata( @SerialName("channel_id") val channelId: OptionalSnowflake = OptionalSnowflake.Missing, @SerialName("duration_seconds") - val durationSeconds: Optional = Optional.Missing(), + val durationSeconds: Optional = Optional.Missing, @SerialName("custom_message") - val customMessage: Optional = Optional.Missing(), + val customMessage: Optional = Optional.Missing, ) diff --git a/common/src/commonMain/kotlin/entity/Data.kt b/common/src/commonMain/kotlin/entity/Data.kt index 19c3e8d2d7c..8bbc6b54d5b 100644 --- a/common/src/commonMain/kotlin/entity/Data.kt +++ b/common/src/commonMain/kotlin/entity/Data.kt @@ -14,7 +14,7 @@ public data class DiscordPinsUpdateData( @SerialName("channel_id") val channelId: Snowflake, @SerialName("last_pin_timestamp") - val lastPinTimestamp: Optional = Optional.Missing(), + val lastPinTimestamp: Optional = Optional.Missing, ) @Serializable @@ -26,5 +26,5 @@ public data class DiscordTyping( @SerialName("user_id") val userId: Snowflake, val timestamp: InstantInEpochSeconds, - val member: Optional = Optional.Missing() + val member: Optional = Optional.Missing ) diff --git a/common/src/commonMain/kotlin/entity/DiscordActivity.kt b/common/src/commonMain/kotlin/entity/DiscordActivity.kt index ec278b3f322..4f7b20877e3 100644 --- a/common/src/commonMain/kotlin/entity/DiscordActivity.kt +++ b/common/src/commonMain/kotlin/entity/DiscordActivity.kt @@ -48,35 +48,35 @@ import kotlinx.serialization.encoding.Encoder public data class DiscordBotActivity( val name: String, val type: ActivityType, - val url: Optional = Optional.Missing(), - val state: Optional = Optional.Missing(), + val url: Optional = Optional.Missing, + val state: Optional = Optional.Missing, ) @Serializable public data class DiscordActivity( val name: String, val type: ActivityType, - val url: Optional = Optional.Missing(), + val url: Optional = Optional.Missing, @SerialName("created_at") val createdAt: InstantInEpochMilliseconds, - val timestamps: Optional = Optional.Missing(), + val timestamps: Optional = Optional.Missing, @SerialName("application_id") val applicationId: OptionalSnowflake = OptionalSnowflake.Missing, - val details: Optional = Optional.Missing(), - val state: Optional = Optional.Missing(), - val emoji: Optional = Optional.Missing(), - val party: Optional = Optional.Missing(), - val assets: Optional = Optional.Missing(), - val secrets: Optional = Optional.Missing(), + val details: Optional = Optional.Missing, + val state: Optional = Optional.Missing, + val emoji: Optional = Optional.Missing, + val party: Optional = Optional.Missing, + val assets: Optional = Optional.Missing, + val secrets: Optional = Optional.Missing, val instance: OptionalBoolean = OptionalBoolean.Missing, - val flags: Optional = Optional.Missing(), - val buttons: Optional> = Optional.Missing() + val flags: Optional = Optional.Missing, + val buttons: Optional> = Optional.Missing ) @Serializable public data class DiscordActivityTimestamps( - val start: Optional = Optional.Missing(), - val end: Optional = Optional.Missing(), + val start: Optional = Optional.Missing, + val end: Optional = Optional.Missing, ) @Serializable @@ -88,8 +88,8 @@ public data class DiscordActivityEmoji( @Serializable public data class DiscordActivityParty( - val id: Optional = Optional.Missing(), - val size: Optional = Optional.Missing() + val id: Optional = Optional.Missing, + val size: Optional = Optional.Missing ) @Serializable(DiscordActivityPartySize.Serializer::class) @@ -118,18 +118,18 @@ public data class DiscordActivityPartySize( @Serializable public data class DiscordActivityAssets( @SerialName("large_image") - val largeImage: Optional = Optional.Missing(), + val largeImage: Optional = Optional.Missing, @SerialName("large_text") - val largeText: Optional = Optional.Missing(), + val largeText: Optional = Optional.Missing, @SerialName("small_image") - val smallImage: Optional = Optional.Missing(), + val smallImage: Optional = Optional.Missing, @SerialName("small_text") - val smallText: Optional = Optional.Missing() + val smallText: Optional = Optional.Missing ) @Serializable public data class DiscordActivitySecrets( - val join: Optional = Optional.Missing(), - val spectate: Optional = Optional.Missing(), - val match: Optional = Optional.Missing() + val join: Optional = Optional.Missing, + val spectate: Optional = Optional.Missing, + val match: Optional = Optional.Missing ) diff --git a/common/src/commonMain/kotlin/entity/DiscordApplication.kt b/common/src/commonMain/kotlin/entity/DiscordApplication.kt index c0858c20956..2b9006d45d8 100644 --- a/common/src/commonMain/kotlin/entity/DiscordApplication.kt +++ b/common/src/commonMain/kotlin/entity/DiscordApplication.kt @@ -96,16 +96,16 @@ public data class DiscordApplication( override val icon: String?, override val description: String, @SerialName("rpc_origins") - override val rpcOrigins: Optional> = Optional.Missing(), + override val rpcOrigins: Optional> = Optional.Missing, @SerialName("bot_public") val botPublic: Boolean, @SerialName("bot_require_code_grant") val botRequireCodeGrant: Boolean, @SerialName("terms_of_service_url") - override val termsOfServiceUrl: Optional = Optional.Missing(), + override val termsOfServiceUrl: Optional = Optional.Missing, @SerialName("privacy_policy_url") - override val privacyPolicyUrl: Optional = Optional.Missing(), - override val owner: Optional = Optional.Missing(), + override val privacyPolicyUrl: Optional = Optional.Missing, + override val owner: Optional = Optional.Missing, @SerialName("verify_key") override val verifyKey: String, val team: DiscordTeam?, @@ -113,17 +113,17 @@ public data class DiscordApplication( override val guildId: OptionalSnowflake = OptionalSnowflake.Missing, @SerialName("primary_sku_id") override val primarySkuId: OptionalSnowflake = OptionalSnowflake.Missing, - override val slug: Optional = Optional.Missing(), + override val slug: Optional = Optional.Missing, @SerialName("cover_image") - override val coverImage: Optional = Optional.Missing(), - override val flags: Optional = Optional.Missing(), - override val tags: Optional> = Optional.Missing(), + override val coverImage: Optional = Optional.Missing, + override val flags: Optional = Optional.Missing, + override val tags: Optional> = Optional.Missing, @SerialName("install_params") - override val installParams: Optional = Optional.Missing(), + override val installParams: Optional = Optional.Missing, @SerialName("custom_install_url") - override val customInstallUrl: Optional = Optional.Missing(), + override val customInstallUrl: Optional = Optional.Missing, @SerialName("role_connections_verification_url") - override val roleConnectionsVerificationUrl: Optional = Optional.Missing(), + override val roleConnectionsVerificationUrl: Optional = Optional.Missing, ) : BaseDiscordApplication /** @@ -138,29 +138,29 @@ public data class DiscordPartialApplication( override val icon: String?, override val description: String, @SerialName("rpc_origins") - override val rpcOrigins: Optional> = Optional.Missing(), + override val rpcOrigins: Optional> = Optional.Missing, @SerialName("terms_of_service_url") - override val termsOfServiceUrl: Optional = Optional.Missing(), + override val termsOfServiceUrl: Optional = Optional.Missing, @SerialName("privacy_policy_url") - override val privacyPolicyUrl: Optional = Optional.Missing(), - override val owner: Optional = Optional.Missing(), + override val privacyPolicyUrl: Optional = Optional.Missing, + override val owner: Optional = Optional.Missing, @SerialName("verify_key") override val verifyKey: String, @SerialName("guild_id") override val guildId: OptionalSnowflake = OptionalSnowflake.Missing, @SerialName("primary_sku_id") override val primarySkuId: OptionalSnowflake = OptionalSnowflake.Missing, - override val slug: Optional = Optional.Missing(), + override val slug: Optional = Optional.Missing, @SerialName("cover_image") - override val coverImage: Optional = Optional.Missing(), - override val flags: Optional = Optional.Missing(), - override val tags: Optional> = Optional.Missing(), + override val coverImage: Optional = Optional.Missing, + override val flags: Optional = Optional.Missing, + override val tags: Optional> = Optional.Missing, @SerialName("install_params") - override val installParams: Optional = Optional.Missing(), + override val installParams: Optional = Optional.Missing, @SerialName("custom_install_url") - override val customInstallUrl: Optional = Optional.Missing(), + override val customInstallUrl: Optional = Optional.Missing, @SerialName("role_connections_verification_url") - override val roleConnectionsVerificationUrl: Optional = Optional.Missing(), + override val roleConnectionsVerificationUrl: Optional = Optional.Missing, ) : BaseDiscordApplication @Serializable diff --git a/common/src/commonMain/kotlin/entity/DiscordChannel.kt b/common/src/commonMain/kotlin/entity/DiscordChannel.kt index d6b247f33a8..d8f4a732446 100644 --- a/common/src/commonMain/kotlin/entity/DiscordChannel.kt +++ b/common/src/commonMain/kotlin/entity/DiscordChannel.kt @@ -132,9 +132,9 @@ public data class DiscordChannel( val guildId: OptionalSnowflake = OptionalSnowflake.Missing, val position: OptionalInt = OptionalInt.Missing, @SerialName("permission_overwrites") - val permissionOverwrites: Optional> = Optional.Missing(), - val name: Optional = Optional.Missing(), - val topic: Optional = Optional.Missing(), + val permissionOverwrites: Optional> = Optional.Missing, + val name: Optional = Optional.Missing, + val topic: Optional = Optional.Missing, val nsfw: OptionalBoolean = OptionalBoolean.Missing, @SerialName("last_message_id") val lastMessageId: OptionalSnowflake? = OptionalSnowflake.Missing, @@ -142,9 +142,9 @@ public data class DiscordChannel( @SerialName("user_limit") val userLimit: OptionalInt = OptionalInt.Missing, @SerialName("rate_limit_per_user") - val rateLimitPerUser: Optional = Optional.Missing(), - val recipients: Optional> = Optional.Missing(), - val icon: Optional = Optional.Missing(), + val rateLimitPerUser: Optional = Optional.Missing, + val recipients: Optional> = Optional.Missing, + val icon: Optional = Optional.Missing, @SerialName("owner_id") val ownerId: OptionalSnowflake = OptionalSnowflake.Missing, @SerialName("application_id") @@ -152,39 +152,39 @@ public data class DiscordChannel( @SerialName("parent_id") val parentId: OptionalSnowflake? = OptionalSnowflake.Missing, @SerialName("last_pin_timestamp") - val lastPinTimestamp: Optional = Optional.Missing(), + val lastPinTimestamp: Optional = Optional.Missing, @SerialName("rtc_region") - val rtcRegion: Optional = Optional.Missing(), + val rtcRegion: Optional = Optional.Missing, @SerialName("video_quality_mode") - val videoQualityMode: Optional = Optional.Missing(), - val permissions: Optional = Optional.Missing(), + val videoQualityMode: Optional = Optional.Missing, + val permissions: Optional = Optional.Missing, @SerialName("message_count") val messageCount: OptionalInt = OptionalInt.Missing, @SerialName("member_count") val memberCount: OptionalInt = OptionalInt.Missing, @SerialName("thread_metadata") - val threadMetadata: Optional = Optional.Missing(), + val threadMetadata: Optional = Optional.Missing, @SerialName("default_auto_archive_duration") - val defaultAutoArchiveDuration: Optional = Optional.Missing(), - val member: Optional = Optional.Missing(), - val flags: Optional = Optional.Missing(), + val defaultAutoArchiveDuration: Optional = Optional.Missing, + val member: Optional = Optional.Missing, + val flags: Optional = Optional.Missing, @SerialName("total_message_sent") val totalMessageSent: OptionalInt = OptionalInt.Missing, @SerialName("available_tags") - val availableTags: Optional> = Optional.Missing(), + val availableTags: Optional> = Optional.Missing, @SerialName("applied_tags") - val appliedTags: Optional> = Optional.Missing(), + val appliedTags: Optional> = Optional.Missing, @SerialName("default_reaction_emoji") - val defaultReactionEmoji: Optional = Optional.Missing(), + val defaultReactionEmoji: Optional = Optional.Missing, @SerialName("default_thread_rate_limit_per_user") - val defaultThreadRateLimitPerUser: Optional = Optional.Missing(), + val defaultThreadRateLimitPerUser: Optional = Optional.Missing, @SerialName("default_sort_order") - val defaultSortOrder: Optional = Optional.Missing(), + val defaultSortOrder: Optional = Optional.Missing, @SerialName("default_forum_layout") - val defaultForumLayout: Optional = Optional.Missing(), + val defaultForumLayout: Optional = Optional.Missing, // original message when starting thread in forum or media channel, see // https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel - val message: Optional = Optional.Missing(), + val message: Optional = Optional.Missing, ) @Serializable @@ -205,7 +205,7 @@ public data class DiscordThreadMetadata( val locked: OptionalBoolean = OptionalBoolean.Missing, val invitable: OptionalBoolean = OptionalBoolean.Missing, @SerialName("create_timestamp") - val createTimestamp: Optional = Optional.Missing(), + val createTimestamp: Optional = Optional.Missing, ) // this should actually be generated with @file:Generate, diff --git a/common/src/commonMain/kotlin/entity/DiscordComponent.kt b/common/src/commonMain/kotlin/entity/DiscordComponent.kt index e9ee9252795..f3b8b7c6014 100644 --- a/common/src/commonMain/kotlin/entity/DiscordComponent.kt +++ b/common/src/commonMain/kotlin/entity/DiscordComponent.kt @@ -111,18 +111,18 @@ public sealed class DiscordComponent { @Serializable public data class DiscordChatComponent( override val type: ComponentType, - val style: Optional = Optional.Missing(), - override val label: Optional = Optional.Missing(), - override val emoji: Optional = Optional.Missing(), + val style: Optional = Optional.Missing, + override val label: Optional = Optional.Missing, + override val emoji: Optional = Optional.Missing, @SerialName("custom_id") - override val customId: Optional = Optional.Missing(), - override val url: Optional = Optional.Missing(), + override val customId: Optional = Optional.Missing, + override val url: Optional = Optional.Missing, override val disabled: OptionalBoolean = OptionalBoolean.Missing, - override val components: Optional> = Optional.Missing(), - override val options: Optional> = Optional.Missing(), - override val placeholder: Optional = Optional.Missing(), + override val components: Optional> = Optional.Missing, + override val options: Optional> = Optional.Missing, + override val placeholder: Optional = Optional.Missing, @SerialName("default_values") - override val defaultValues: Optional> = Optional.Missing(), + override val defaultValues: Optional> = Optional.Missing, @SerialName("min_values") override val minValues: OptionalInt = OptionalInt.Missing, @SerialName("max_values") @@ -132,26 +132,26 @@ public data class DiscordChatComponent( @SerialName("max_length") override val maxLength: OptionalInt = OptionalInt.Missing, override val required: OptionalBoolean = OptionalBoolean.Missing, - override val value: Optional = Optional.Missing(), + override val value: Optional = Optional.Missing, @SerialName("channel_types") - override val channelTypes: Optional> = Optional.Missing(), + override val channelTypes: Optional> = Optional.Missing, ) : DiscordComponent() @Serializable public data class DiscordTextInputComponent( override val type: ComponentType, - public val style: Optional = Optional.Missing(), - override val label: Optional = Optional.Missing(), - override val emoji: Optional = Optional.Missing(), + public val style: Optional = Optional.Missing, + override val label: Optional = Optional.Missing, + override val emoji: Optional = Optional.Missing, @SerialName("custom_id") - override val customId: Optional = Optional.Missing(), - override val url: Optional = Optional.Missing(), + override val customId: Optional = Optional.Missing, + override val url: Optional = Optional.Missing, override val disabled: OptionalBoolean = OptionalBoolean.Missing, - override val components: Optional> = Optional.Missing(), - override val options: Optional> = Optional.Missing(), - override val placeholder: Optional = Optional.Missing(), + override val components: Optional> = Optional.Missing, + override val options: Optional> = Optional.Missing, + override val placeholder: Optional = Optional.Missing, @SerialName("default_values") - override val defaultValues: Optional> = Optional.Missing(), + override val defaultValues: Optional> = Optional.Missing, @SerialName("min_values") override val minValues: OptionalInt = OptionalInt.Missing, @SerialName("max_values") @@ -161,7 +161,7 @@ public data class DiscordTextInputComponent( @SerialName("max_length") override val maxLength: OptionalInt = OptionalInt.Missing, override val required: OptionalBoolean = OptionalBoolean.Missing, - override val value: Optional = Optional.Missing(), + override val value: Optional = Optional.Missing, @SerialName("channel_types") - override val channelTypes: Optional> = Optional.Missing(), + override val channelTypes: Optional> = Optional.Missing, ) : DiscordComponent() diff --git a/common/src/commonMain/kotlin/entity/DiscordConnection.kt b/common/src/commonMain/kotlin/entity/DiscordConnection.kt index f77904f2a00..2700094ca1d 100644 --- a/common/src/commonMain/kotlin/entity/DiscordConnection.kt +++ b/common/src/commonMain/kotlin/entity/DiscordConnection.kt @@ -37,7 +37,7 @@ public data class DiscordConnection( val name: String, val type: String, val revoked: OptionalBoolean = OptionalBoolean.Missing, - val integrations: Optional> = Optional.Missing(), + val integrations: Optional> = Optional.Missing, val verified: Boolean, @SerialName("friend_sync") val friendSync: Boolean, diff --git a/common/src/commonMain/kotlin/entity/DiscordEmoji.kt b/common/src/commonMain/kotlin/entity/DiscordEmoji.kt index 62ddba911fa..8340ba16374 100644 --- a/common/src/commonMain/kotlin/entity/DiscordEmoji.kt +++ b/common/src/commonMain/kotlin/entity/DiscordEmoji.kt @@ -21,8 +21,8 @@ import kotlinx.serialization.Serializable public data class DiscordEmoji( val id: Snowflake?, val name: String?, - val roles: Optional> = Optional.Missing(), - val user: Optional = Optional.Missing(), + val roles: Optional> = Optional.Missing, + val user: Optional = Optional.Missing, @SerialName("require_colons") val requireColons: OptionalBoolean = OptionalBoolean.Missing, val managed: OptionalBoolean = OptionalBoolean.Missing, diff --git a/common/src/commonMain/kotlin/entity/DiscordGuild.kt b/common/src/commonMain/kotlin/entity/DiscordGuild.kt index 06fafa330c8..c800bc54084 100644 --- a/common/src/commonMain/kotlin/entity/DiscordGuild.kt +++ b/common/src/commonMain/kotlin/entity/DiscordGuild.kt @@ -253,12 +253,12 @@ public data class DiscordGuild( val id: Snowflake, val name: String, val icon: String?, - @SerialName("icon_hash") val iconHash: Optional = Optional.Missing(), - val splash: Optional = Optional.Missing(), - @SerialName("discovery_splash") val discoverySplash: Optional = Optional.Missing(), + @SerialName("icon_hash") val iconHash: Optional = Optional.Missing, + val splash: Optional = Optional.Missing, + @SerialName("discovery_splash") val discoverySplash: Optional = Optional.Missing, val owner: OptionalBoolean = OptionalBoolean.Missing, @SerialName("owner_id") val ownerId: Snowflake, - val permissions: Optional = Optional.Missing(), + val permissions: Optional = Optional.Missing, @Deprecated( "The region field has been moved to Channel#rtcRegion in Discord API v9", ReplaceWith("DiscordChannel#rtcRegion") @@ -278,15 +278,15 @@ public data class DiscordGuild( @SerialName("system_channel_id") val systemChannelId: Snowflake?, @SerialName("system_channel_flags") val systemChannelFlags: SystemChannelFlags, @SerialName("rules_channel_id") val rulesChannelId: Snowflake?, - @SerialName("joined_at") val joinedAt: Optional = Optional.Missing(), + @SerialName("joined_at") val joinedAt: Optional = Optional.Missing, val large: OptionalBoolean = OptionalBoolean.Missing, val unavailable: OptionalBoolean = OptionalBoolean.Missing, @SerialName("member_count") val memberCount: OptionalInt = OptionalInt.Missing, - @SerialName("voice_states") val voiceStates: Optional> = Optional.Missing(), - val members: Optional> = Optional.Missing(), - val channels: Optional> = Optional.Missing(), - val threads: Optional> = Optional.Missing(), - val presences: Optional> = Optional.Missing(), + @SerialName("voice_states") val voiceStates: Optional> = Optional.Missing, + val members: Optional> = Optional.Missing, + val channels: Optional> = Optional.Missing, + val threads: Optional> = Optional.Missing, + val presences: Optional> = Optional.Missing, @SerialName("max_presences") val maxPresences: OptionalInt? = OptionalInt.Missing, @SerialName("max_members") val maxMembers: OptionalInt = OptionalInt.Missing, @SerialName("vanity_url_code") val vanityUrlCode: String?, @@ -300,13 +300,13 @@ public data class DiscordGuild( @SerialName("max_stage_video_channel_users") val maxStageVideoChannelUsers: OptionalInt = OptionalInt.Missing, @SerialName("approximate_member_count") val approximateMemberCount: OptionalInt = OptionalInt.Missing, @SerialName("approximate_presence_count") val approximatePresenceCount: OptionalInt = OptionalInt.Missing, - @SerialName("welcome_screen") val welcomeScreen: Optional = Optional.Missing(), + @SerialName("welcome_screen") val welcomeScreen: Optional = Optional.Missing, @SerialName("nsfw_level") val nsfwLevel: NsfwLevel, @SerialName("stage_instances") - val stageInstances: Optional> = Optional.Missing(), - val stickers: Optional> = Optional.Missing(), + val stageInstances: Optional> = Optional.Missing, + val stickers: Optional> = Optional.Missing, @SerialName("guild_scheduled_events") - val guildScheduledEvents: Optional> = Optional.Missing(), + val guildScheduledEvents: Optional> = Optional.Missing, @SerialName("premium_progress_bar_enabled") val premiumProgressBarEnabled: Boolean, @SerialName("safety_alerts_channel_id") @@ -330,21 +330,21 @@ public data class DiscordPartialGuild( val name: String, val icon: String?, val owner: OptionalBoolean = OptionalBoolean.Missing, - val permissions: Optional = Optional.Missing(), + val permissions: Optional = Optional.Missing, val features: List, - @SerialName("welcome_screen") val welcomeScreen: Optional = Optional.Missing(), - @SerialName("vanity_url_code") val vanityUrlCode: Optional = Optional.Missing(), - val description: Optional = Optional.Missing(), - val banner: Optional = Optional.Missing(), - val splash: Optional = Optional.Missing(), - @SerialName("nsfw_level") val nsfwLevel: Optional = Optional.Missing(), + @SerialName("welcome_screen") val welcomeScreen: Optional = Optional.Missing, + @SerialName("vanity_url_code") val vanityUrlCode: Optional = Optional.Missing, + val description: Optional = Optional.Missing, + val banner: Optional = Optional.Missing, + val splash: Optional = Optional.Missing, + @SerialName("nsfw_level") val nsfwLevel: Optional = Optional.Missing, @SerialName("verification_level") - val verificationLevel: Optional = Optional.Missing(), + val verificationLevel: Optional = Optional.Missing, @SerialName("stage_instances") - val stageInstances: Optional> = Optional.Missing(), - val stickers: Optional> = Optional.Missing(), + val stageInstances: Optional> = Optional.Missing, + val stickers: Optional> = Optional.Missing, @SerialName("guild_scheduled_events") - val guildScheduledEvents: Optional> = Optional.Missing(), + val guildScheduledEvents: Optional> = Optional.Missing, @SerialName("approximate_member_count") val approximateMemberCount: OptionalInt = OptionalInt.Missing, @SerialName("approximate_presence_count") @@ -422,7 +422,7 @@ public data class DiscordVoiceState( @SerialName("guild_id") val guildId: OptionalSnowflake = OptionalSnowflake.Missing, @SerialName("channel_id") val channelId: Snowflake?, @SerialName("user_id") val userId: Snowflake, - val member: Optional = Optional.Missing(), + val member: Optional = Optional.Missing, @SerialName("session_id") val sessionId: String, val deaf: Boolean, val mute: Boolean, diff --git a/common/src/commonMain/kotlin/entity/DiscordGuildScheduledEvent.kt b/common/src/commonMain/kotlin/entity/DiscordGuildScheduledEvent.kt index d89df783823..9379ca3da42 100644 --- a/common/src/commonMain/kotlin/entity/DiscordGuildScheduledEvent.kt +++ b/common/src/commonMain/kotlin/entity/DiscordGuildScheduledEvent.kt @@ -70,7 +70,7 @@ public data class DiscordGuildScheduledEvent( @SerialName("creator_id") val creatorId: OptionalSnowflake? = OptionalSnowflake.Missing, val name: String, - val description: Optional = Optional.Missing(), + val description: Optional = Optional.Missing, @SerialName("scheduled_start_time") val scheduledStartTime: Instant, @SerialName("scheduled_end_time") @@ -84,10 +84,10 @@ public data class DiscordGuildScheduledEvent( val entityId: Snowflake?, @SerialName("entity_metadata") val entityMetadata: GuildScheduledEventEntityMetadata?, - val creator: Optional = Optional.Missing(), + val creator: Optional = Optional.Missing, @SerialName("user_count") val userCount: OptionalInt = OptionalInt.Missing, - val image: Optional = Optional.Missing(), + val image: Optional = Optional.Missing, ) /** @@ -97,5 +97,5 @@ public data class DiscordGuildScheduledEvent( */ @Serializable public data class GuildScheduledEventEntityMetadata( - val location: Optional = Optional.Missing() + val location: Optional = Optional.Missing ) diff --git a/common/src/commonMain/kotlin/entity/DiscordIntegration.kt b/common/src/commonMain/kotlin/entity/DiscordIntegration.kt index ac89a904c5b..34adf30a446 100644 --- a/common/src/commonMain/kotlin/entity/DiscordIntegration.kt +++ b/common/src/commonMain/kotlin/entity/DiscordIntegration.kt @@ -33,17 +33,17 @@ public data class DiscordIntegration( @SerialName("enable_emoticons") val enableEmoticons: OptionalBoolean = OptionalBoolean.Missing, @SerialName("expire_behavior") - val expireBehavior: Optional = Optional.Missing(), + val expireBehavior: Optional = Optional.Missing, @SerialName("expire_grace_period") - val expireGracePeriod: Optional = Optional.Missing(), - val user: Optional = Optional.Missing(), + val expireGracePeriod: Optional = Optional.Missing, + val user: Optional = Optional.Missing, val account: DiscordIntegrationsAccount, @SerialName("synced_at") - val syncedAt: Optional = Optional.Missing(), + val syncedAt: Optional = Optional.Missing, @SerialName("subscriber_count") val subscriberCount: OptionalInt = OptionalInt.Missing, val revoked: OptionalBoolean = OptionalBoolean.Missing, - val application: Optional = Optional.Missing(), + val application: Optional = Optional.Missing, @SerialName("guild_id") // available in Integration Create and Integration Update events val guildId: OptionalSnowflake = OptionalSnowflake.Missing, ) @@ -62,7 +62,7 @@ public data class IntegrationApplication( val name: String, val icon: String?, val description: String, - val bot: Optional = Optional.Missing(), + val bot: Optional = Optional.Missing, ) @Serializable diff --git a/common/src/commonMain/kotlin/entity/DiscordInvite.kt b/common/src/commonMain/kotlin/entity/DiscordInvite.kt index 40459500724..25e3c9f5d2d 100644 --- a/common/src/commonMain/kotlin/entity/DiscordInvite.kt +++ b/common/src/commonMain/kotlin/entity/DiscordInvite.kt @@ -36,48 +36,48 @@ public sealed interface BaseDiscordInvite { @Serializable public data class DiscordInvite( override val code: String, - override val guild: Optional = Optional.Missing(), + override val guild: Optional = Optional.Missing, override val channel: DiscordChannel?, - override val inviter: Optional = Optional.Missing(), + override val inviter: Optional = Optional.Missing, @SerialName("target_type") - override val targetType: Optional = Optional.Missing(), + override val targetType: Optional = Optional.Missing, @SerialName("target_user") - override val targetUser: Optional = Optional.Missing(), + override val targetUser: Optional = Optional.Missing, @SerialName("target_application") - override val targetApplication: Optional = Optional.Missing(), + override val targetApplication: Optional = Optional.Missing, @SerialName("approximate_presence_count") override val approximatePresenceCount: OptionalInt = OptionalInt.Missing, @SerialName("approximate_member_count") override val approximateMemberCount: OptionalInt = OptionalInt.Missing, @SerialName("expires_at") - override val expiresAt: Optional = Optional.Missing(), + override val expiresAt: Optional = Optional.Missing, @SerialName("stage_instance") @Deprecated("Stages are no longer discoverable") - val stageInstance: Optional = Optional.Missing(), + val stageInstance: Optional = Optional.Missing, @SerialName("guild_scheduled_event") - override val guildScheduledEvent: Optional = Optional.Missing(), + override val guildScheduledEvent: Optional = Optional.Missing, ) : BaseDiscordInvite @Serializable public data class DiscordInviteWithMetadata( override val code: String, - override val guild: Optional = Optional.Missing(), + override val guild: Optional = Optional.Missing, override val channel: DiscordChannel?, - override val inviter: Optional = Optional.Missing(), + override val inviter: Optional = Optional.Missing, @SerialName("target_type") - override val targetType: Optional = Optional.Missing(), + override val targetType: Optional = Optional.Missing, @SerialName("target_user") - override val targetUser: Optional = Optional.Missing(), + override val targetUser: Optional = Optional.Missing, @SerialName("target_application") - override val targetApplication: Optional = Optional.Missing(), + override val targetApplication: Optional = Optional.Missing, @SerialName("approximate_presence_count") override val approximatePresenceCount: OptionalInt = OptionalInt.Missing, @SerialName("approximate_member_count") override val approximateMemberCount: OptionalInt = OptionalInt.Missing, @SerialName("expires_at") - override val expiresAt: Optional = Optional.Missing(), + override val expiresAt: Optional = Optional.Missing, @SerialName("guild_scheduled_event") - override val guildScheduledEvent: Optional = Optional.Missing(), + override val guildScheduledEvent: Optional = Optional.Missing, val uses: Int, @SerialName("max_uses") val maxUses: Int, diff --git a/common/src/commonMain/kotlin/entity/DiscordMessage.kt b/common/src/commonMain/kotlin/entity/DiscordMessage.kt index 6cd1a5bc853..95259e864d5 100644 --- a/common/src/commonMain/kotlin/entity/DiscordMessage.kt +++ b/common/src/commonMain/kotlin/entity/DiscordMessage.kt @@ -194,7 +194,7 @@ public data class DiscordMessage( @SerialName("guild_id") val guildId: OptionalSnowflake = OptionalSnowflake.Missing, val author: DiscordUser, - val member: Optional = Optional.Missing(), + val member: Optional = Optional.Missing, val content: String, val timestamp: Instant, @SerialName("edited_timestamp") @@ -206,36 +206,36 @@ public data class DiscordMessage( @SerialName("mention_roles") val mentionRoles: List, @SerialName("mention_channels") - val mentionedChannels: Optional> = Optional.Missing(), + val mentionedChannels: Optional> = Optional.Missing, val attachments: List, val embeds: List, - val reactions: Optional> = Optional.Missing(), - val nonce: Optional<@Serializable(with = LongOrStringSerializer::class) String> = Optional.Missing(), + val reactions: Optional> = Optional.Missing, + val nonce: Optional<@Serializable(with = LongOrStringSerializer::class) String> = Optional.Missing, val pinned: Boolean, @SerialName("webhook_id") val webhookId: OptionalSnowflake = OptionalSnowflake.Missing, val type: MessageType, - val activity: Optional = Optional.Missing(), - val application: Optional = Optional.Missing(), + val activity: Optional = Optional.Missing, + val application: Optional = Optional.Missing, @SerialName("application_id") val applicationId: OptionalSnowflake = OptionalSnowflake.Missing, @SerialName("message_reference") - val messageReference: Optional = Optional.Missing(), - val flags: Optional = Optional.Missing(), + val messageReference: Optional = Optional.Missing, + val flags: Optional = Optional.Missing, @SerialName("sticker_items") - val stickers: Optional> = Optional.Missing(), + val stickers: Optional> = Optional.Missing, @SerialName("referenced_message") - val referencedMessage: Optional = Optional.Missing(), + val referencedMessage: Optional = Optional.Missing, @SerialName("role_subscription_data") - val roleSubscriptionData: Optional = Optional.Missing(), + val roleSubscriptionData: Optional = Optional.Missing, /* * don't trust the docs: * This is a list even though the docs say it's a component */ - val components: Optional> = Optional.Missing(), - val interaction: Optional = Optional.Missing(), - val thread: Optional = Optional.Missing(), + val components: Optional> = Optional.Missing, + val interaction: Optional = Optional.Missing, + val thread: Optional = Optional.Missing, val position: OptionalInt = OptionalInt.Missing ) @@ -254,13 +254,13 @@ public data class DiscordMessageSticker( val packId: OptionalSnowflake = OptionalSnowflake.Missing, val name: String, val description: String?, - val tags: Optional = Optional.Missing(), + val tags: Optional = Optional.Missing, @SerialName("format_type") val formatType: MessageStickerType, val available: OptionalBoolean = OptionalBoolean.Missing, @SerialName("guild_id") val guildId: OptionalSnowflake = OptionalSnowflake.Missing, - val user: Optional = Optional.Missing(), + val user: Optional = Optional.Missing, @SerialName("sort_value") val sortValue: OptionalInt = OptionalInt.Missing ) @@ -340,37 +340,37 @@ public data class DiscordPartialMessage( val channelId: Snowflake, @SerialName("guild_id") val guildId: OptionalSnowflake = OptionalSnowflake.Missing, - val author: Optional = Optional.Missing(), - val member: Optional = Optional.Missing(), - val content: Optional = Optional.Missing(), - val timestamp: Optional = Optional.Missing(), + val author: Optional = Optional.Missing, + val member: Optional = Optional.Missing, + val content: Optional = Optional.Missing, + val timestamp: Optional = Optional.Missing, @SerialName("edited_timestamp") - val editedTimestamp: Optional = Optional.Missing(), + val editedTimestamp: Optional = Optional.Missing, val tts: OptionalBoolean = OptionalBoolean.Missing, @SerialName("mention_everyone") val mentionEveryone: OptionalBoolean = OptionalBoolean.Missing, - val mentions: Optional> = Optional.Missing(), + val mentions: Optional> = Optional.Missing, @SerialName("mention_roles") - val mentionRoles: Optional> = Optional.Missing(), + val mentionRoles: Optional> = Optional.Missing, @SerialName("mention_channels") - val mentionedChannels: Optional> = Optional.Missing(), - val attachments: Optional> = Optional.Missing(), - val embeds: Optional> = Optional.Missing(), - val reactions: Optional> = Optional.Missing(), - val nonce: Optional = Optional.Missing(), + val mentionedChannels: Optional> = Optional.Missing, + val attachments: Optional> = Optional.Missing, + val embeds: Optional> = Optional.Missing, + val reactions: Optional> = Optional.Missing, + val nonce: Optional = Optional.Missing, val pinned: OptionalBoolean = OptionalBoolean.Missing, @SerialName("webhook_id") val webhookId: OptionalSnowflake = OptionalSnowflake.Missing, - val type: Optional = Optional.Missing(), - val activity: Optional = Optional.Missing(), - val application: Optional = Optional.Missing(), + val type: Optional = Optional.Missing, + val activity: Optional = Optional.Missing, + val application: Optional = Optional.Missing, @SerialName("message_reference") - val messageReference: Optional = Optional.Missing(), - val flags: Optional = Optional.Missing(), - val stickers: Optional> = Optional.Missing(), + val messageReference: Optional = Optional.Missing, + val flags: Optional = Optional.Missing, + val stickers: Optional> = Optional.Missing, @SerialName("referenced_message") - val referencedMessage: Optional = Optional.Missing(), - val interaction: Optional = Optional.Missing(), + val referencedMessage: Optional = Optional.Missing, + val interaction: Optional = Optional.Missing, val position: OptionalInt = OptionalInt.Missing, ) @@ -423,9 +423,9 @@ public data class DiscordMentionedChannel( public data class DiscordAttachment( val id: Snowflake, val filename: String, - val description: Optional = Optional.Missing(), + val description: Optional = Optional.Missing, @SerialName("content_type") - val contentType: Optional = Optional.Missing(), + val contentType: Optional = Optional.Missing, val size: Int, val url: String, @SerialName("proxy_url") @@ -434,9 +434,9 @@ public data class DiscordAttachment( val width: OptionalInt? = OptionalInt.Missing, val ephemeral: OptionalBoolean = OptionalBoolean.Missing, @SerialName("duration_secs") - val durationSecs: Optional = Optional.Missing(), - val waveform: Optional = Optional.Missing(), - val flags: Optional = Optional.Missing(), + val durationSecs: Optional = Optional.Missing, + val waveform: Optional = Optional.Missing, + val flags: Optional = Optional.Missing, ) /** @@ -458,19 +458,19 @@ public data class DiscordAttachment( */ @Serializable public data class DiscordEmbed( - val title: Optional = Optional.Missing(), - val type: Optional = Optional.Missing(), - val description: Optional = Optional.Missing(), - val url: Optional = Optional.Missing(), - val timestamp: Optional = Optional.Missing(), + val title: Optional = Optional.Missing, + val type: Optional = Optional.Missing, + val description: Optional = Optional.Missing, + val url: Optional = Optional.Missing, + val timestamp: Optional = Optional.Missing, val color: OptionalInt = OptionalInt.Missing, - val footer: Optional