From 58410a8da2f965f520cbeeb1c12b5a01e0307a31 Mon Sep 17 00:00:00 2001 From: schlaubi Date: Tue, 17 Sep 2024 11:00:05 +0200 Subject: [PATCH] Add fields to remaining builders --- .../entity/ApplicationIntegrationType.kt | 4 +- rest/api/rest.api | 68 ++++++++++++++++--- rest/api/rest.klib.api | 51 ++++++++++++-- .../interaction/ApplicationCommandBuilders.kt | 17 +++++ .../builder/interaction/InputChatBuilders.kt | 7 +- .../interaction/MessageCommandBuilders.kt | 7 +- .../interaction/UserCommandBuilders.kt | 7 +- .../json/request/InteractionsRequests.kt | 6 ++ 8 files changed, 147 insertions(+), 20 deletions(-) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationIntegrationType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationIntegrationType.kt index 12c5f733890..8452deb05bb 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationIntegrationType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationIntegrationType.kt @@ -53,7 +53,7 @@ public sealed class ApplicationIntegrationType( /** * App is installable to users */ - public object UserInstall : ApplicationIntegrationType(0) + public object UserInstall : ApplicationIntegrationType(1) internal object Serializer : KSerializer { override val descriptor: SerialDescriptor = @@ -75,6 +75,7 @@ public sealed class ApplicationIntegrationType( public val entries: List by lazy(mode = PUBLICATION) { listOf( GuildInstall, + UserInstall, ) } @@ -84,6 +85,7 @@ public sealed class ApplicationIntegrationType( */ public fun from(`value`: Int): ApplicationIntegrationType = when (value) { 0 -> GuildInstall + 1 -> UserInstall else -> Unknown(value) } } diff --git a/rest/api/rest.api b/rest/api/rest.api index fef3709807d..a1c29234309 100644 --- a/rest/api/rest.api +++ b/rest/api/rest.api @@ -1443,16 +1443,24 @@ public final class dev/kord/rest/builder/interaction/ApplicationCommandCreateBui } public abstract interface class dev/kord/rest/builder/interaction/ApplicationCommandModifyBuilder : dev/kord/rest/builder/RequestBuilder, dev/kord/rest/builder/interaction/LocalizedNameModifyBuilder { + public abstract fun getContexts ()Ljava/util/List; public abstract fun getDefaultMemberPermissions ()Ldev/kord/common/entity/Permissions; public abstract fun getDefaultPermission ()Ljava/lang/Boolean; + public abstract fun getIntegrationTypes ()Ljava/util/List; public abstract fun getNsfw ()Ljava/lang/Boolean; + public abstract fun requireContext ([Ldev/kord/common/entity/InteractionContextType;)V + public abstract fun requireIntegrationTypes ([Ldev/kord/common/entity/ApplicationIntegrationType;)V + public abstract fun setContexts (Ljava/util/List;)V public abstract fun setDefaultMemberPermissions (Ldev/kord/common/entity/Permissions;)V public abstract fun setDefaultPermission (Ljava/lang/Boolean;)V + public abstract fun setIntegrationTypes (Ljava/util/List;)V public abstract fun setNsfw (Ljava/lang/Boolean;)V } public final class dev/kord/rest/builder/interaction/ApplicationCommandModifyBuilder$DefaultImpls { public static fun name (Ldev/kord/rest/builder/interaction/ApplicationCommandModifyBuilder;Ldev/kord/common/Locale;Ljava/lang/String;)V + public static fun requireContext (Ldev/kord/rest/builder/interaction/ApplicationCommandModifyBuilder;[Ldev/kord/common/entity/InteractionContextType;)V + public static fun requireIntegrationTypes (Ldev/kord/rest/builder/interaction/ApplicationCommandModifyBuilder;[Ldev/kord/common/entity/ApplicationIntegrationType;)V } public final class dev/kord/rest/builder/interaction/AttachmentBuilder : dev/kord/rest/builder/interaction/OptionsBuilder { @@ -1546,26 +1554,34 @@ public abstract interface class dev/kord/rest/builder/interaction/ChatInputModif public final class dev/kord/rest/builder/interaction/ChatInputModifyBuilder$DefaultImpls { public static fun description (Ldev/kord/rest/builder/interaction/ChatInputModifyBuilder;Ldev/kord/common/Locale;Ljava/lang/String;)V public static fun name (Ldev/kord/rest/builder/interaction/ChatInputModifyBuilder;Ldev/kord/common/Locale;Ljava/lang/String;)V + public static fun requireContext (Ldev/kord/rest/builder/interaction/ChatInputModifyBuilder;[Ldev/kord/common/entity/InteractionContextType;)V + public static fun requireIntegrationTypes (Ldev/kord/rest/builder/interaction/ChatInputModifyBuilder;[Ldev/kord/common/entity/ApplicationIntegrationType;)V } public final class dev/kord/rest/builder/interaction/ChatInputModifyBuilderImpl : dev/kord/rest/builder/interaction/GlobalChatInputModifyBuilder { public fun ()V public fun description (Ldev/kord/common/Locale;Ljava/lang/String;)V + public fun getContexts ()Ljava/util/List; public fun getDefaultMemberPermissions ()Ldev/kord/common/entity/Permissions; public fun getDefaultPermission ()Ljava/lang/Boolean; public fun getDescription ()Ljava/lang/String; public fun getDescriptionLocalizations ()Ljava/util/Map; public fun getDmPermission ()Ljava/lang/Boolean; + public fun getIntegrationTypes ()Ljava/util/List; public fun getName ()Ljava/lang/String; public fun getNameLocalizations ()Ljava/util/Map; public fun getNsfw ()Ljava/lang/Boolean; public fun getOptions ()Ljava/util/List; public fun name (Ldev/kord/common/Locale;Ljava/lang/String;)V + public fun requireContext ([Ldev/kord/common/entity/InteractionContextType;)V + public fun requireIntegrationTypes ([Ldev/kord/common/entity/ApplicationIntegrationType;)V + public fun setContexts (Ljava/util/List;)V public fun setDefaultMemberPermissions (Ldev/kord/common/entity/Permissions;)V public fun setDefaultPermission (Ljava/lang/Boolean;)V public fun setDescription (Ljava/lang/String;)V public fun setDescriptionLocalizations (Ljava/util/Map;)V public fun setDmPermission (Ljava/lang/Boolean;)V + public fun setIntegrationTypes (Ljava/util/List;)V public fun setName (Ljava/lang/String;)V public fun setNameLocalizations (Ljava/util/Map;)V public fun setNsfw (Ljava/lang/Boolean;)V @@ -1604,6 +1620,8 @@ public abstract interface class dev/kord/rest/builder/interaction/GlobalApplicat public final class dev/kord/rest/builder/interaction/GlobalApplicationCommandModifyBuilder$DefaultImpls { public static fun name (Ldev/kord/rest/builder/interaction/GlobalApplicationCommandModifyBuilder;Ldev/kord/common/Locale;Ljava/lang/String;)V + public static fun requireContext (Ldev/kord/rest/builder/interaction/GlobalApplicationCommandModifyBuilder;[Ldev/kord/common/entity/InteractionContextType;)V + public static fun requireIntegrationTypes (Ldev/kord/rest/builder/interaction/GlobalApplicationCommandModifyBuilder;[Ldev/kord/common/entity/ApplicationIntegrationType;)V } public abstract interface class dev/kord/rest/builder/interaction/GlobalChatInputCreateBuilder : dev/kord/rest/builder/interaction/ChatInputCreateBuilder, dev/kord/rest/builder/interaction/GlobalApplicationCommandCreateBuilder { @@ -1623,6 +1641,8 @@ public abstract interface class dev/kord/rest/builder/interaction/GlobalChatInpu public final class dev/kord/rest/builder/interaction/GlobalChatInputModifyBuilder$DefaultImpls { public static fun description (Ldev/kord/rest/builder/interaction/GlobalChatInputModifyBuilder;Ldev/kord/common/Locale;Ljava/lang/String;)V public static fun name (Ldev/kord/rest/builder/interaction/GlobalChatInputModifyBuilder;Ldev/kord/common/Locale;Ljava/lang/String;)V + public static fun requireContext (Ldev/kord/rest/builder/interaction/GlobalChatInputModifyBuilder;[Ldev/kord/common/entity/InteractionContextType;)V + public static fun requireIntegrationTypes (Ldev/kord/rest/builder/interaction/GlobalChatInputModifyBuilder;[Ldev/kord/common/entity/ApplicationIntegrationType;)V } public abstract interface class dev/kord/rest/builder/interaction/GlobalMessageCommandCreateBuilder : dev/kord/rest/builder/interaction/GlobalApplicationCommandCreateBuilder, dev/kord/rest/builder/interaction/MessageCommandCreateBuilder { @@ -1640,6 +1660,8 @@ public abstract interface class dev/kord/rest/builder/interaction/GlobalMessageC public final class dev/kord/rest/builder/interaction/GlobalMessageCommandModifyBuilder$DefaultImpls { public static fun name (Ldev/kord/rest/builder/interaction/GlobalMessageCommandModifyBuilder;Ldev/kord/common/Locale;Ljava/lang/String;)V + public static fun requireContext (Ldev/kord/rest/builder/interaction/GlobalMessageCommandModifyBuilder;[Ldev/kord/common/entity/InteractionContextType;)V + public static fun requireIntegrationTypes (Ldev/kord/rest/builder/interaction/GlobalMessageCommandModifyBuilder;[Ldev/kord/common/entity/ApplicationIntegrationType;)V } public final class dev/kord/rest/builder/interaction/GlobalMultiApplicationCommandBuilder : dev/kord/rest/builder/interaction/MultiApplicationCommandBuilder { @@ -1667,6 +1689,8 @@ public abstract interface class dev/kord/rest/builder/interaction/GlobalUserComm public final class dev/kord/rest/builder/interaction/GlobalUserCommandModifyBuilder$DefaultImpls { public static fun name (Ldev/kord/rest/builder/interaction/GlobalUserCommandModifyBuilder;Ldev/kord/common/Locale;Ljava/lang/String;)V + public static fun requireContext (Ldev/kord/rest/builder/interaction/GlobalUserCommandModifyBuilder;[Ldev/kord/common/entity/InteractionContextType;)V + public static fun requireIntegrationTypes (Ldev/kord/rest/builder/interaction/GlobalUserCommandModifyBuilder;[Ldev/kord/common/entity/ApplicationIntegrationType;)V } public final class dev/kord/rest/builder/interaction/GroupCommandBuilder : dev/kord/rest/builder/interaction/BaseCommandOptionBuilder { @@ -1819,20 +1843,28 @@ public abstract interface class dev/kord/rest/builder/interaction/MessageCommand public final class dev/kord/rest/builder/interaction/MessageCommandModifyBuilder$DefaultImpls { public static fun name (Ldev/kord/rest/builder/interaction/MessageCommandModifyBuilder;Ldev/kord/common/Locale;Ljava/lang/String;)V + public static fun requireContext (Ldev/kord/rest/builder/interaction/MessageCommandModifyBuilder;[Ldev/kord/common/entity/InteractionContextType;)V + public static fun requireIntegrationTypes (Ldev/kord/rest/builder/interaction/MessageCommandModifyBuilder;[Ldev/kord/common/entity/ApplicationIntegrationType;)V } public final class dev/kord/rest/builder/interaction/MessageCommandModifyBuilderImpl : dev/kord/rest/builder/interaction/GlobalMessageCommandModifyBuilder { public fun ()V + public fun getContexts ()Ljava/util/List; public fun getDefaultMemberPermissions ()Ldev/kord/common/entity/Permissions; public fun getDefaultPermission ()Ljava/lang/Boolean; public fun getDmPermission ()Ljava/lang/Boolean; + public fun getIntegrationTypes ()Ljava/util/List; public fun getName ()Ljava/lang/String; public fun getNameLocalizations ()Ljava/util/Map; public fun getNsfw ()Ljava/lang/Boolean; public fun name (Ldev/kord/common/Locale;Ljava/lang/String;)V + public fun requireContext ([Ldev/kord/common/entity/InteractionContextType;)V + public fun requireIntegrationTypes ([Ldev/kord/common/entity/ApplicationIntegrationType;)V + public fun setContexts (Ljava/util/List;)V public fun setDefaultMemberPermissions (Ldev/kord/common/entity/Permissions;)V public fun setDefaultPermission (Ljava/lang/Boolean;)V public fun setDmPermission (Ljava/lang/Boolean;)V + public fun setIntegrationTypes (Ljava/util/List;)V public fun setName (Ljava/lang/String;)V public fun setNameLocalizations (Ljava/util/Map;)V public fun setNsfw (Ljava/lang/Boolean;)V @@ -1974,20 +2006,28 @@ public abstract interface class dev/kord/rest/builder/interaction/UserCommandMod public final class dev/kord/rest/builder/interaction/UserCommandModifyBuilder$DefaultImpls { public static fun name (Ldev/kord/rest/builder/interaction/UserCommandModifyBuilder;Ldev/kord/common/Locale;Ljava/lang/String;)V + public static fun requireContext (Ldev/kord/rest/builder/interaction/UserCommandModifyBuilder;[Ldev/kord/common/entity/InteractionContextType;)V + public static fun requireIntegrationTypes (Ldev/kord/rest/builder/interaction/UserCommandModifyBuilder;[Ldev/kord/common/entity/ApplicationIntegrationType;)V } public final class dev/kord/rest/builder/interaction/UserCommandModifyBuilderImpl : dev/kord/rest/builder/interaction/GlobalUserCommandModifyBuilder { public fun ()V + public fun getContexts ()Ljava/util/List; public fun getDefaultMemberPermissions ()Ldev/kord/common/entity/Permissions; public fun getDefaultPermission ()Ljava/lang/Boolean; public fun getDmPermission ()Ljava/lang/Boolean; + public fun getIntegrationTypes ()Ljava/util/List; public fun getName ()Ljava/lang/String; public fun getNameLocalizations ()Ljava/util/Map; public fun getNsfw ()Ljava/lang/Boolean; public fun name (Ldev/kord/common/Locale;Ljava/lang/String;)V + public fun requireContext ([Ldev/kord/common/entity/InteractionContextType;)V + public fun requireIntegrationTypes ([Ldev/kord/common/entity/ApplicationIntegrationType;)V + public fun setContexts (Ljava/util/List;)V public fun setDefaultMemberPermissions (Ldev/kord/common/entity/Permissions;)V public fun setDefaultPermission (Ljava/lang/Boolean;)V public fun setDmPermission (Ljava/lang/Boolean;)V + public fun setIntegrationTypes (Ljava/util/List;)V public fun setName (Ljava/lang/String;)V public fun setNameLocalizations (Ljava/util/Map;)V public fun setNsfw (Ljava/lang/Boolean;)V @@ -2759,10 +2799,12 @@ public final class dev/kord/rest/json/JsonErrorCode$Companion { public final class dev/kord/rest/json/request/ApplicationCommandCreateRequest { public static final field Companion Ldev/kord/rest/json/request/ApplicationCommandCreateRequest$Companion; - public fun (Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/ApplicationCommandType;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;)V - public synthetic fun (Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/ApplicationCommandType;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/ApplicationCommandType;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;)V + public synthetic fun (Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/ApplicationCommandType;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; - public final fun component10 ()Ldev/kord/common/entity/optional/OptionalBoolean; + public final fun component10 ()Ldev/kord/common/entity/optional/Optional; + public final fun component11 ()Ldev/kord/common/entity/optional/Optional; + public final fun component12 ()Ldev/kord/common/entity/optional/OptionalBoolean; public final fun component2 ()Ldev/kord/common/entity/optional/Optional; public final fun component3 ()Ldev/kord/common/entity/ApplicationCommandType; public final fun component4 ()Ldev/kord/common/entity/optional/Optional; @@ -2771,14 +2813,16 @@ public final class dev/kord/rest/json/request/ApplicationCommandCreateRequest { public final fun component7 ()Ldev/kord/common/entity/optional/Optional; public final fun component8 ()Ldev/kord/common/entity/optional/OptionalBoolean; public final fun component9 ()Ldev/kord/common/entity/optional/OptionalBoolean; - public final fun copy (Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/ApplicationCommandType;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;)Ldev/kord/rest/json/request/ApplicationCommandCreateRequest; - public static synthetic fun copy$default (Ldev/kord/rest/json/request/ApplicationCommandCreateRequest;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/ApplicationCommandType;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;ILjava/lang/Object;)Ldev/kord/rest/json/request/ApplicationCommandCreateRequest; + public final fun copy (Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/ApplicationCommandType;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;)Ldev/kord/rest/json/request/ApplicationCommandCreateRequest; + public static synthetic fun copy$default (Ldev/kord/rest/json/request/ApplicationCommandCreateRequest;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/ApplicationCommandType;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;ILjava/lang/Object;)Ldev/kord/rest/json/request/ApplicationCommandCreateRequest; public fun equals (Ljava/lang/Object;)Z + public final fun getContexts ()Ldev/kord/common/entity/optional/Optional; public final fun getDefaultMemberPermissions ()Ldev/kord/common/entity/optional/Optional; public final fun getDefaultPermission ()Ldev/kord/common/entity/optional/OptionalBoolean; public final fun getDescription ()Ldev/kord/common/entity/optional/Optional; public final fun getDescriptionLocalizations ()Ldev/kord/common/entity/optional/Optional; public final fun getDmPermission ()Ldev/kord/common/entity/optional/OptionalBoolean; + public final fun getIntegrationTypes ()Ldev/kord/common/entity/optional/Optional; public final fun getName ()Ljava/lang/String; public final fun getNameLocalizations ()Ldev/kord/common/entity/optional/Optional; public final fun getNsfw ()Ldev/kord/common/entity/optional/OptionalBoolean; @@ -2806,9 +2850,11 @@ public final class dev/kord/rest/json/request/ApplicationCommandCreateRequest$Co public final class dev/kord/rest/json/request/ApplicationCommandModifyRequest { public static final field Companion Ldev/kord/rest/json/request/ApplicationCommandModifyRequest$Companion; public fun ()V - public fun (Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;)V - public synthetic fun (Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;)V + public synthetic fun (Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/kord/common/entity/optional/Optional; + public final fun component10 ()Ldev/kord/common/entity/optional/Optional; + public final fun component11 ()Ldev/kord/common/entity/optional/OptionalBoolean; public final fun component2 ()Ldev/kord/common/entity/optional/Optional; public final fun component3 ()Ldev/kord/common/entity/optional/Optional; public final fun component4 ()Ldev/kord/common/entity/optional/Optional; @@ -2816,15 +2862,17 @@ public final class dev/kord/rest/json/request/ApplicationCommandModifyRequest { public final fun component6 ()Ldev/kord/common/entity/optional/Optional; public final fun component7 ()Ldev/kord/common/entity/optional/OptionalBoolean; public final fun component8 ()Ldev/kord/common/entity/optional/OptionalBoolean; - public final fun component9 ()Ldev/kord/common/entity/optional/OptionalBoolean; - public final fun copy (Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;)Ldev/kord/rest/json/request/ApplicationCommandModifyRequest; - public static synthetic fun copy$default (Ldev/kord/rest/json/request/ApplicationCommandModifyRequest;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;ILjava/lang/Object;)Ldev/kord/rest/json/request/ApplicationCommandModifyRequest; + public final fun component9 ()Ldev/kord/common/entity/optional/Optional; + public final fun copy (Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;)Ldev/kord/rest/json/request/ApplicationCommandModifyRequest; + public static synthetic fun copy$default (Ldev/kord/rest/json/request/ApplicationCommandModifyRequest;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;ILjava/lang/Object;)Ldev/kord/rest/json/request/ApplicationCommandModifyRequest; public fun equals (Ljava/lang/Object;)Z + public final fun getContexts ()Ldev/kord/common/entity/optional/Optional; public final fun getDefaultMemberPermissions ()Ldev/kord/common/entity/optional/Optional; public final fun getDefaultPermission ()Ldev/kord/common/entity/optional/OptionalBoolean; public final fun getDescription ()Ldev/kord/common/entity/optional/Optional; public final fun getDescriptionLocalizations ()Ldev/kord/common/entity/optional/Optional; public final fun getDmPermission ()Ldev/kord/common/entity/optional/OptionalBoolean; + public final fun getIntegrationTypes ()Ldev/kord/common/entity/optional/Optional; public final fun getName ()Ldev/kord/common/entity/optional/Optional; public final fun getNameLocalizations ()Ldev/kord/common/entity/optional/Optional; public final fun getNsfw ()Ldev/kord/common/entity/optional/OptionalBoolean; diff --git a/rest/api/rest.klib.api b/rest/api/rest.klib.api index 8f13adadefb..48ddfcdcf2f 100644 --- a/rest/api/rest.klib.api +++ b/rest/api/rest.klib.api @@ -271,15 +271,24 @@ abstract interface dev.kord.rest.builder.interaction/ApplicationCommandCreateBui } abstract interface dev.kord.rest.builder.interaction/ApplicationCommandModifyBuilder : dev.kord.rest.builder.interaction/LocalizedNameModifyBuilder, dev.kord.rest.builder/RequestBuilder { // dev.kord.rest.builder.interaction/ApplicationCommandModifyBuilder|null[0] + abstract var contexts // dev.kord.rest.builder.interaction/ApplicationCommandModifyBuilder.contexts|{}contexts[0] + abstract fun (): kotlin.collections/MutableList? // dev.kord.rest.builder.interaction/ApplicationCommandModifyBuilder.contexts.|(){}[0] + abstract fun (kotlin.collections/MutableList?) // dev.kord.rest.builder.interaction/ApplicationCommandModifyBuilder.contexts.|(kotlin.collections.MutableList?){}[0] abstract var defaultMemberPermissions // dev.kord.rest.builder.interaction/ApplicationCommandModifyBuilder.defaultMemberPermissions|{}defaultMemberPermissions[0] abstract fun (): dev.kord.common.entity/Permissions? // dev.kord.rest.builder.interaction/ApplicationCommandModifyBuilder.defaultMemberPermissions.|(){}[0] abstract fun (dev.kord.common.entity/Permissions?) // dev.kord.rest.builder.interaction/ApplicationCommandModifyBuilder.defaultMemberPermissions.|(dev.kord.common.entity.Permissions?){}[0] abstract var defaultPermission // dev.kord.rest.builder.interaction/ApplicationCommandModifyBuilder.defaultPermission|{}defaultPermission[0] abstract fun (): kotlin/Boolean? // dev.kord.rest.builder.interaction/ApplicationCommandModifyBuilder.defaultPermission.|(){}[0] abstract fun (kotlin/Boolean?) // dev.kord.rest.builder.interaction/ApplicationCommandModifyBuilder.defaultPermission.|(kotlin.Boolean?){}[0] + abstract var integrationTypes // dev.kord.rest.builder.interaction/ApplicationCommandModifyBuilder.integrationTypes|{}integrationTypes[0] + abstract fun (): kotlin.collections/MutableList? // dev.kord.rest.builder.interaction/ApplicationCommandModifyBuilder.integrationTypes.|(){}[0] + abstract fun (kotlin.collections/MutableList?) // dev.kord.rest.builder.interaction/ApplicationCommandModifyBuilder.integrationTypes.|(kotlin.collections.MutableList?){}[0] abstract var nsfw // dev.kord.rest.builder.interaction/ApplicationCommandModifyBuilder.nsfw|{}nsfw[0] abstract fun (): kotlin/Boolean? // dev.kord.rest.builder.interaction/ApplicationCommandModifyBuilder.nsfw.|(){}[0] abstract fun (kotlin/Boolean?) // dev.kord.rest.builder.interaction/ApplicationCommandModifyBuilder.nsfw.|(kotlin.Boolean?){}[0] + + open fun requireContext(kotlin/Array...) // dev.kord.rest.builder.interaction/ApplicationCommandModifyBuilder.requireContext|requireContext(kotlin.Array...){}[0] + open fun requireIntegrationTypes(kotlin/Array...) // dev.kord.rest.builder.interaction/ApplicationCommandModifyBuilder.requireIntegrationTypes|requireIntegrationTypes(kotlin.Array...){}[0] } abstract interface dev.kord.rest.builder.interaction/ChatInputCreateBuilder : dev.kord.rest.builder.interaction/ApplicationCommandCreateBuilder, dev.kord.rest.builder.interaction/LocalizedDescriptionCreateBuilder, dev.kord.rest.builder.interaction/RootInputChatBuilder // dev.kord.rest.builder.interaction/ChatInputCreateBuilder|null[0] @@ -2171,6 +2180,9 @@ final class dev.kord.rest.builder.interaction/ChatInputCreateBuilderImpl : dev.k final class dev.kord.rest.builder.interaction/ChatInputModifyBuilderImpl : dev.kord.rest.builder.interaction/GlobalChatInputModifyBuilder { // dev.kord.rest.builder.interaction/ChatInputModifyBuilderImpl|null[0] constructor () // dev.kord.rest.builder.interaction/ChatInputModifyBuilderImpl.|(){}[0] + final var contexts // dev.kord.rest.builder.interaction/ChatInputModifyBuilderImpl.contexts|{}contexts[0] + final fun (): kotlin.collections/MutableList? // dev.kord.rest.builder.interaction/ChatInputModifyBuilderImpl.contexts.|(){}[0] + final fun (kotlin.collections/MutableList?) // dev.kord.rest.builder.interaction/ChatInputModifyBuilderImpl.contexts.|(kotlin.collections.MutableList?){}[0] final var defaultMemberPermissions // dev.kord.rest.builder.interaction/ChatInputModifyBuilderImpl.defaultMemberPermissions|{}defaultMemberPermissions[0] final fun (): dev.kord.common.entity/Permissions? // dev.kord.rest.builder.interaction/ChatInputModifyBuilderImpl.defaultMemberPermissions.|(){}[0] final fun (dev.kord.common.entity/Permissions?) // dev.kord.rest.builder.interaction/ChatInputModifyBuilderImpl.defaultMemberPermissions.|(dev.kord.common.entity.Permissions?){}[0] @@ -2186,6 +2198,9 @@ final class dev.kord.rest.builder.interaction/ChatInputModifyBuilderImpl : dev.k final var dmPermission // dev.kord.rest.builder.interaction/ChatInputModifyBuilderImpl.dmPermission|{}dmPermission[0] final fun (): kotlin/Boolean? // dev.kord.rest.builder.interaction/ChatInputModifyBuilderImpl.dmPermission.|(){}[0] final fun (kotlin/Boolean?) // dev.kord.rest.builder.interaction/ChatInputModifyBuilderImpl.dmPermission.|(kotlin.Boolean?){}[0] + final var integrationTypes // dev.kord.rest.builder.interaction/ChatInputModifyBuilderImpl.integrationTypes|{}integrationTypes[0] + final fun (): kotlin.collections/MutableList? // dev.kord.rest.builder.interaction/ChatInputModifyBuilderImpl.integrationTypes.|(){}[0] + final fun (kotlin.collections/MutableList?) // dev.kord.rest.builder.interaction/ChatInputModifyBuilderImpl.integrationTypes.|(kotlin.collections.MutableList?){}[0] final var name // dev.kord.rest.builder.interaction/ChatInputModifyBuilderImpl.name|{}name[0] final fun (): kotlin/String? // dev.kord.rest.builder.interaction/ChatInputModifyBuilderImpl.name.|(){}[0] final fun (kotlin/String?) // dev.kord.rest.builder.interaction/ChatInputModifyBuilderImpl.name.|(kotlin.String?){}[0] @@ -2285,6 +2300,9 @@ final class dev.kord.rest.builder.interaction/MessageCommandCreateBuilderImpl : final class dev.kord.rest.builder.interaction/MessageCommandModifyBuilderImpl : dev.kord.rest.builder.interaction/GlobalMessageCommandModifyBuilder { // dev.kord.rest.builder.interaction/MessageCommandModifyBuilderImpl|null[0] constructor () // dev.kord.rest.builder.interaction/MessageCommandModifyBuilderImpl.|(){}[0] + final var contexts // dev.kord.rest.builder.interaction/MessageCommandModifyBuilderImpl.contexts|{}contexts[0] + final fun (): kotlin.collections/MutableList? // dev.kord.rest.builder.interaction/MessageCommandModifyBuilderImpl.contexts.|(){}[0] + final fun (kotlin.collections/MutableList?) // dev.kord.rest.builder.interaction/MessageCommandModifyBuilderImpl.contexts.|(kotlin.collections.MutableList?){}[0] final var defaultMemberPermissions // dev.kord.rest.builder.interaction/MessageCommandModifyBuilderImpl.defaultMemberPermissions|{}defaultMemberPermissions[0] final fun (): dev.kord.common.entity/Permissions? // dev.kord.rest.builder.interaction/MessageCommandModifyBuilderImpl.defaultMemberPermissions.|(){}[0] final fun (dev.kord.common.entity/Permissions?) // dev.kord.rest.builder.interaction/MessageCommandModifyBuilderImpl.defaultMemberPermissions.|(dev.kord.common.entity.Permissions?){}[0] @@ -2294,6 +2312,9 @@ final class dev.kord.rest.builder.interaction/MessageCommandModifyBuilderImpl : final var dmPermission // dev.kord.rest.builder.interaction/MessageCommandModifyBuilderImpl.dmPermission|{}dmPermission[0] final fun (): kotlin/Boolean? // dev.kord.rest.builder.interaction/MessageCommandModifyBuilderImpl.dmPermission.|(){}[0] final fun (kotlin/Boolean?) // dev.kord.rest.builder.interaction/MessageCommandModifyBuilderImpl.dmPermission.|(kotlin.Boolean?){}[0] + final var integrationTypes // dev.kord.rest.builder.interaction/MessageCommandModifyBuilderImpl.integrationTypes|{}integrationTypes[0] + final fun (): kotlin.collections/MutableList? // dev.kord.rest.builder.interaction/MessageCommandModifyBuilderImpl.integrationTypes.|(){}[0] + final fun (kotlin.collections/MutableList?) // dev.kord.rest.builder.interaction/MessageCommandModifyBuilderImpl.integrationTypes.|(kotlin.collections.MutableList?){}[0] final var name // dev.kord.rest.builder.interaction/MessageCommandModifyBuilderImpl.name|{}name[0] final fun (): kotlin/String? // dev.kord.rest.builder.interaction/MessageCommandModifyBuilderImpl.name.|(){}[0] final fun (kotlin/String?) // dev.kord.rest.builder.interaction/MessageCommandModifyBuilderImpl.name.|(kotlin.String?){}[0] @@ -2393,6 +2414,9 @@ final class dev.kord.rest.builder.interaction/UserCommandCreateBuilderImpl : dev final class dev.kord.rest.builder.interaction/UserCommandModifyBuilderImpl : dev.kord.rest.builder.interaction/GlobalUserCommandModifyBuilder { // dev.kord.rest.builder.interaction/UserCommandModifyBuilderImpl|null[0] constructor () // dev.kord.rest.builder.interaction/UserCommandModifyBuilderImpl.|(){}[0] + final var contexts // dev.kord.rest.builder.interaction/UserCommandModifyBuilderImpl.contexts|{}contexts[0] + final fun (): kotlin.collections/MutableList? // dev.kord.rest.builder.interaction/UserCommandModifyBuilderImpl.contexts.|(){}[0] + final fun (kotlin.collections/MutableList?) // dev.kord.rest.builder.interaction/UserCommandModifyBuilderImpl.contexts.|(kotlin.collections.MutableList?){}[0] final var defaultMemberPermissions // dev.kord.rest.builder.interaction/UserCommandModifyBuilderImpl.defaultMemberPermissions|{}defaultMemberPermissions[0] final fun (): dev.kord.common.entity/Permissions? // dev.kord.rest.builder.interaction/UserCommandModifyBuilderImpl.defaultMemberPermissions.|(){}[0] final fun (dev.kord.common.entity/Permissions?) // dev.kord.rest.builder.interaction/UserCommandModifyBuilderImpl.defaultMemberPermissions.|(dev.kord.common.entity.Permissions?){}[0] @@ -2402,6 +2426,9 @@ final class dev.kord.rest.builder.interaction/UserCommandModifyBuilderImpl : dev final var dmPermission // dev.kord.rest.builder.interaction/UserCommandModifyBuilderImpl.dmPermission|{}dmPermission[0] final fun (): kotlin/Boolean? // dev.kord.rest.builder.interaction/UserCommandModifyBuilderImpl.dmPermission.|(){}[0] final fun (kotlin/Boolean?) // dev.kord.rest.builder.interaction/UserCommandModifyBuilderImpl.dmPermission.|(kotlin.Boolean?){}[0] + final var integrationTypes // dev.kord.rest.builder.interaction/UserCommandModifyBuilderImpl.integrationTypes|{}integrationTypes[0] + final fun (): kotlin.collections/MutableList? // dev.kord.rest.builder.interaction/UserCommandModifyBuilderImpl.integrationTypes.|(){}[0] + final fun (kotlin.collections/MutableList?) // dev.kord.rest.builder.interaction/UserCommandModifyBuilderImpl.integrationTypes.|(kotlin.collections.MutableList?){}[0] final var name // dev.kord.rest.builder.interaction/UserCommandModifyBuilderImpl.name|{}name[0] final fun (): kotlin/String? // dev.kord.rest.builder.interaction/UserCommandModifyBuilderImpl.name.|(){}[0] final fun (kotlin/String?) // dev.kord.rest.builder.interaction/UserCommandModifyBuilderImpl.name.|(kotlin.String?){}[0] @@ -2980,8 +3007,10 @@ final class dev.kord.rest.builder.webhook/WebhookModifyBuilder : dev.kord.rest.b } final class dev.kord.rest.json.request/ApplicationCommandCreateRequest { // dev.kord.rest.json.request/ApplicationCommandCreateRequest|null[0] - constructor (kotlin/String, dev.kord.common.entity.optional/Optional?> = ..., dev.kord.common.entity/ApplicationCommandType, dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional?> = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/OptionalBoolean? = ..., dev.kord.common.entity.optional/OptionalBoolean = ..., dev.kord.common.entity.optional/OptionalBoolean = ...) // dev.kord.rest.json.request/ApplicationCommandCreateRequest.|(kotlin.String;dev.kord.common.entity.optional.Optional?>;dev.kord.common.entity.ApplicationCommandType;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional?>;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.OptionalBoolean?;dev.kord.common.entity.optional.OptionalBoolean;dev.kord.common.entity.optional.OptionalBoolean){}[0] + constructor (kotlin/String, dev.kord.common.entity.optional/Optional?> = ..., dev.kord.common.entity/ApplicationCommandType, dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional?> = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/OptionalBoolean? = ..., dev.kord.common.entity.optional/OptionalBoolean = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional?> = ..., dev.kord.common.entity.optional/OptionalBoolean = ...) // dev.kord.rest.json.request/ApplicationCommandCreateRequest.|(kotlin.String;dev.kord.common.entity.optional.Optional?>;dev.kord.common.entity.ApplicationCommandType;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional?>;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.OptionalBoolean?;dev.kord.common.entity.optional.OptionalBoolean;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional?>;dev.kord.common.entity.optional.OptionalBoolean){}[0] + final val contexts // dev.kord.rest.json.request/ApplicationCommandCreateRequest.contexts|{}contexts[0] + final fun (): dev.kord.common.entity.optional/Optional?> // dev.kord.rest.json.request/ApplicationCommandCreateRequest.contexts.|(){}[0] final val defaultMemberPermissions // dev.kord.rest.json.request/ApplicationCommandCreateRequest.defaultMemberPermissions|{}defaultMemberPermissions[0] final fun (): dev.kord.common.entity.optional/Optional // dev.kord.rest.json.request/ApplicationCommandCreateRequest.defaultMemberPermissions.|(){}[0] final val defaultPermission // dev.kord.rest.json.request/ApplicationCommandCreateRequest.defaultPermission|{}defaultPermission[0] @@ -2992,6 +3021,8 @@ final class dev.kord.rest.json.request/ApplicationCommandCreateRequest { // dev. final fun (): dev.kord.common.entity.optional/Optional?> // dev.kord.rest.json.request/ApplicationCommandCreateRequest.descriptionLocalizations.|(){}[0] final val dmPermission // dev.kord.rest.json.request/ApplicationCommandCreateRequest.dmPermission|{}dmPermission[0] final fun (): dev.kord.common.entity.optional/OptionalBoolean? // dev.kord.rest.json.request/ApplicationCommandCreateRequest.dmPermission.|(){}[0] + final val integrationTypes // dev.kord.rest.json.request/ApplicationCommandCreateRequest.integrationTypes|{}integrationTypes[0] + final fun (): dev.kord.common.entity.optional/Optional> // dev.kord.rest.json.request/ApplicationCommandCreateRequest.integrationTypes.|(){}[0] final val name // dev.kord.rest.json.request/ApplicationCommandCreateRequest.name|{}name[0] final fun (): kotlin/String // dev.kord.rest.json.request/ApplicationCommandCreateRequest.name.|(){}[0] final val nameLocalizations // dev.kord.rest.json.request/ApplicationCommandCreateRequest.nameLocalizations|{}nameLocalizations[0] @@ -3004,7 +3035,9 @@ final class dev.kord.rest.json.request/ApplicationCommandCreateRequest { // dev. final fun (): dev.kord.common.entity/ApplicationCommandType // dev.kord.rest.json.request/ApplicationCommandCreateRequest.type.|(){}[0] final fun component1(): kotlin/String // dev.kord.rest.json.request/ApplicationCommandCreateRequest.component1|component1(){}[0] - final fun component10(): dev.kord.common.entity.optional/OptionalBoolean // dev.kord.rest.json.request/ApplicationCommandCreateRequest.component10|component10(){}[0] + final fun component10(): dev.kord.common.entity.optional/Optional> // dev.kord.rest.json.request/ApplicationCommandCreateRequest.component10|component10(){}[0] + final fun component11(): dev.kord.common.entity.optional/Optional?> // dev.kord.rest.json.request/ApplicationCommandCreateRequest.component11|component11(){}[0] + final fun component12(): dev.kord.common.entity.optional/OptionalBoolean // dev.kord.rest.json.request/ApplicationCommandCreateRequest.component12|component12(){}[0] final fun component2(): dev.kord.common.entity.optional/Optional?> // dev.kord.rest.json.request/ApplicationCommandCreateRequest.component2|component2(){}[0] final fun component3(): dev.kord.common.entity/ApplicationCommandType // dev.kord.rest.json.request/ApplicationCommandCreateRequest.component3|component3(){}[0] final fun component4(): dev.kord.common.entity.optional/Optional // dev.kord.rest.json.request/ApplicationCommandCreateRequest.component4|component4(){}[0] @@ -3013,7 +3046,7 @@ final class dev.kord.rest.json.request/ApplicationCommandCreateRequest { // dev. final fun component7(): dev.kord.common.entity.optional/Optional // dev.kord.rest.json.request/ApplicationCommandCreateRequest.component7|component7(){}[0] final fun component8(): dev.kord.common.entity.optional/OptionalBoolean? // dev.kord.rest.json.request/ApplicationCommandCreateRequest.component8|component8(){}[0] final fun component9(): dev.kord.common.entity.optional/OptionalBoolean // dev.kord.rest.json.request/ApplicationCommandCreateRequest.component9|component9(){}[0] - final fun copy(kotlin/String = ..., dev.kord.common.entity.optional/Optional?> = ..., dev.kord.common.entity/ApplicationCommandType = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional?> = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/OptionalBoolean? = ..., dev.kord.common.entity.optional/OptionalBoolean = ..., dev.kord.common.entity.optional/OptionalBoolean = ...): dev.kord.rest.json.request/ApplicationCommandCreateRequest // dev.kord.rest.json.request/ApplicationCommandCreateRequest.copy|copy(kotlin.String;dev.kord.common.entity.optional.Optional?>;dev.kord.common.entity.ApplicationCommandType;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional?>;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.OptionalBoolean?;dev.kord.common.entity.optional.OptionalBoolean;dev.kord.common.entity.optional.OptionalBoolean){}[0] + final fun copy(kotlin/String = ..., dev.kord.common.entity.optional/Optional?> = ..., dev.kord.common.entity/ApplicationCommandType = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional?> = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/OptionalBoolean? = ..., dev.kord.common.entity.optional/OptionalBoolean = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional?> = ..., dev.kord.common.entity.optional/OptionalBoolean = ...): dev.kord.rest.json.request/ApplicationCommandCreateRequest // dev.kord.rest.json.request/ApplicationCommandCreateRequest.copy|copy(kotlin.String;dev.kord.common.entity.optional.Optional?>;dev.kord.common.entity.ApplicationCommandType;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional?>;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.OptionalBoolean?;dev.kord.common.entity.optional.OptionalBoolean;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional?>;dev.kord.common.entity.optional.OptionalBoolean){}[0] final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.rest.json.request/ApplicationCommandCreateRequest.equals|equals(kotlin.Any?){}[0] final fun hashCode(): kotlin/Int // dev.kord.rest.json.request/ApplicationCommandCreateRequest.hashCode|hashCode(){}[0] final fun toString(): kotlin/String // dev.kord.rest.json.request/ApplicationCommandCreateRequest.toString|toString(){}[0] @@ -3035,8 +3068,10 @@ final class dev.kord.rest.json.request/ApplicationCommandCreateRequest { // dev. } final class dev.kord.rest.json.request/ApplicationCommandModifyRequest { // dev.kord.rest.json.request/ApplicationCommandModifyRequest|null[0] - constructor (dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional?> = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional?> = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/OptionalBoolean? = ..., dev.kord.common.entity.optional/OptionalBoolean = ..., dev.kord.common.entity.optional/OptionalBoolean = ...) // dev.kord.rest.json.request/ApplicationCommandModifyRequest.|(dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional?>;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional?>;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.OptionalBoolean?;dev.kord.common.entity.optional.OptionalBoolean;dev.kord.common.entity.optional.OptionalBoolean){}[0] + constructor (dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional?> = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional?> = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/OptionalBoolean? = ..., dev.kord.common.entity.optional/OptionalBoolean = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional?> = ..., dev.kord.common.entity.optional/OptionalBoolean = ...) // dev.kord.rest.json.request/ApplicationCommandModifyRequest.|(dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional?>;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional?>;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.OptionalBoolean?;dev.kord.common.entity.optional.OptionalBoolean;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional?>;dev.kord.common.entity.optional.OptionalBoolean){}[0] + final val contexts // dev.kord.rest.json.request/ApplicationCommandModifyRequest.contexts|{}contexts[0] + final fun (): dev.kord.common.entity.optional/Optional?> // dev.kord.rest.json.request/ApplicationCommandModifyRequest.contexts.|(){}[0] final val defaultMemberPermissions // dev.kord.rest.json.request/ApplicationCommandModifyRequest.defaultMemberPermissions|{}defaultMemberPermissions[0] final fun (): dev.kord.common.entity.optional/Optional // dev.kord.rest.json.request/ApplicationCommandModifyRequest.defaultMemberPermissions.|(){}[0] final val defaultPermission // dev.kord.rest.json.request/ApplicationCommandModifyRequest.defaultPermission|{}defaultPermission[0] @@ -3047,6 +3082,8 @@ final class dev.kord.rest.json.request/ApplicationCommandModifyRequest { // dev. final fun (): dev.kord.common.entity.optional/Optional?> // dev.kord.rest.json.request/ApplicationCommandModifyRequest.descriptionLocalizations.|(){}[0] final val dmPermission // dev.kord.rest.json.request/ApplicationCommandModifyRequest.dmPermission|{}dmPermission[0] final fun (): dev.kord.common.entity.optional/OptionalBoolean? // dev.kord.rest.json.request/ApplicationCommandModifyRequest.dmPermission.|(){}[0] + final val integrationTypes // dev.kord.rest.json.request/ApplicationCommandModifyRequest.integrationTypes|{}integrationTypes[0] + final fun (): dev.kord.common.entity.optional/Optional> // dev.kord.rest.json.request/ApplicationCommandModifyRequest.integrationTypes.|(){}[0] final val name // dev.kord.rest.json.request/ApplicationCommandModifyRequest.name|{}name[0] final fun (): dev.kord.common.entity.optional/Optional // dev.kord.rest.json.request/ApplicationCommandModifyRequest.name.|(){}[0] final val nameLocalizations // dev.kord.rest.json.request/ApplicationCommandModifyRequest.nameLocalizations|{}nameLocalizations[0] @@ -3057,6 +3094,8 @@ final class dev.kord.rest.json.request/ApplicationCommandModifyRequest { // dev. final fun (): dev.kord.common.entity.optional/Optional> // dev.kord.rest.json.request/ApplicationCommandModifyRequest.options.|(){}[0] final fun component1(): dev.kord.common.entity.optional/Optional // dev.kord.rest.json.request/ApplicationCommandModifyRequest.component1|component1(){}[0] + final fun component10(): dev.kord.common.entity.optional/Optional?> // dev.kord.rest.json.request/ApplicationCommandModifyRequest.component10|component10(){}[0] + final fun component11(): dev.kord.common.entity.optional/OptionalBoolean // dev.kord.rest.json.request/ApplicationCommandModifyRequest.component11|component11(){}[0] final fun component2(): dev.kord.common.entity.optional/Optional?> // dev.kord.rest.json.request/ApplicationCommandModifyRequest.component2|component2(){}[0] final fun component3(): dev.kord.common.entity.optional/Optional // dev.kord.rest.json.request/ApplicationCommandModifyRequest.component3|component3(){}[0] final fun component4(): dev.kord.common.entity.optional/Optional?> // dev.kord.rest.json.request/ApplicationCommandModifyRequest.component4|component4(){}[0] @@ -3064,8 +3103,8 @@ final class dev.kord.rest.json.request/ApplicationCommandModifyRequest { // dev. final fun component6(): dev.kord.common.entity.optional/Optional // dev.kord.rest.json.request/ApplicationCommandModifyRequest.component6|component6(){}[0] final fun component7(): dev.kord.common.entity.optional/OptionalBoolean? // dev.kord.rest.json.request/ApplicationCommandModifyRequest.component7|component7(){}[0] final fun component8(): dev.kord.common.entity.optional/OptionalBoolean // dev.kord.rest.json.request/ApplicationCommandModifyRequest.component8|component8(){}[0] - final fun component9(): dev.kord.common.entity.optional/OptionalBoolean // dev.kord.rest.json.request/ApplicationCommandModifyRequest.component9|component9(){}[0] - final fun copy(dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional?> = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional?> = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/OptionalBoolean? = ..., dev.kord.common.entity.optional/OptionalBoolean = ..., dev.kord.common.entity.optional/OptionalBoolean = ...): dev.kord.rest.json.request/ApplicationCommandModifyRequest // dev.kord.rest.json.request/ApplicationCommandModifyRequest.copy|copy(dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional?>;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional?>;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.OptionalBoolean?;dev.kord.common.entity.optional.OptionalBoolean;dev.kord.common.entity.optional.OptionalBoolean){}[0] + final fun component9(): dev.kord.common.entity.optional/Optional> // dev.kord.rest.json.request/ApplicationCommandModifyRequest.component9|component9(){}[0] + final fun copy(dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional?> = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/Optional?> = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional = ..., dev.kord.common.entity.optional/OptionalBoolean? = ..., dev.kord.common.entity.optional/OptionalBoolean = ..., dev.kord.common.entity.optional/Optional> = ..., dev.kord.common.entity.optional/Optional?> = ..., dev.kord.common.entity.optional/OptionalBoolean = ...): dev.kord.rest.json.request/ApplicationCommandModifyRequest // dev.kord.rest.json.request/ApplicationCommandModifyRequest.copy|copy(dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional?>;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.Optional?>;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional;dev.kord.common.entity.optional.OptionalBoolean?;dev.kord.common.entity.optional.OptionalBoolean;dev.kord.common.entity.optional.Optional>;dev.kord.common.entity.optional.Optional?>;dev.kord.common.entity.optional.OptionalBoolean){}[0] final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.rest.json.request/ApplicationCommandModifyRequest.equals|equals(kotlin.Any?){}[0] final fun hashCode(): kotlin/Int // dev.kord.rest.json.request/ApplicationCommandModifyRequest.hashCode|hashCode(){}[0] final fun toString(): kotlin/String // dev.kord.rest.json.request/ApplicationCommandModifyRequest.toString|toString(){}[0] diff --git a/rest/src/commonMain/kotlin/builder/interaction/ApplicationCommandBuilders.kt b/rest/src/commonMain/kotlin/builder/interaction/ApplicationCommandBuilders.kt index 15f83e14c88..2cbf906d37e 100644 --- a/rest/src/commonMain/kotlin/builder/interaction/ApplicationCommandBuilders.kt +++ b/rest/src/commonMain/kotlin/builder/interaction/ApplicationCommandBuilders.kt @@ -69,6 +69,23 @@ public interface ApplicationCommandModifyBuilder : LocalizedNameModifyBuilder, @Deprecated("'defaultPermission' is deprecated in favor of 'defaultMemberPermissions' and 'dmPermission'. Setting 'defaultPermission' to false can be replaced by setting 'defaultMemberPermissions' to empty Permissions and 'dmPermission' to false ('dmPermission' is only available for global commands).") public var defaultPermission: Boolean? + public var integrationTypes: MutableList? + public var contexts: MutableList? + /** Indicates whether the command is age-restricted. */ public var nsfw: Boolean? + + /** + * Requires this command to be executed in a specific [installation context][ApplicationIntegrationType]. + */ + public fun requireIntegrationTypes(vararg types: ApplicationIntegrationType) { + integrationTypes?.addAll(types) ?: run { integrationTypes = types.toMutableList() } + } + + /** + * Requires this command to be executed in a specific [interaction context][InteractionContextType]. + */ + public fun requireContext(vararg types: InteractionContextType) { + contexts?.addAll(types) ?: run { contexts = types.toMutableList() } + } } diff --git a/rest/src/commonMain/kotlin/builder/interaction/InputChatBuilders.kt b/rest/src/commonMain/kotlin/builder/interaction/InputChatBuilders.kt index f6b0f7151e3..f0d7997f8bc 100644 --- a/rest/src/commonMain/kotlin/builder/interaction/InputChatBuilders.kt +++ b/rest/src/commonMain/kotlin/builder/interaction/InputChatBuilders.kt @@ -171,6 +171,8 @@ internal class ChatInputCreateBuilderImpl( state.defaultMemberPermissions, state.dmPermission, @Suppress("DEPRECATION") state.defaultPermission, + integrationTypes = state.integrationTypes, + contexts = state.contexts, nsfw = state.nsfw, ) @@ -203,7 +205,8 @@ internal class ChatInputModifyBuilderImpl : GlobalChatInputModifyBuilder { @Deprecated("'defaultPermission' is deprecated in favor of 'defaultMemberPermissions' and 'dmPermission'. Setting 'defaultPermission' to false can be replaced by setting 'defaultMemberPermissions' to empty Permissions and 'dmPermission' to false ('dmPermission' is only available for global commands).") override var defaultPermission: Boolean? by @Suppress("DEPRECATION") state::defaultPermission.delegate() - + override var integrationTypes: MutableList? by state::integrationTypes.delegate() + override var contexts: MutableList? by state::contexts.delegate() override var nsfw: Boolean? by state::nsfw.delegate() override fun toRequest(): ApplicationCommandModifyRequest { @@ -216,6 +219,8 @@ internal class ChatInputModifyBuilderImpl : GlobalChatInputModifyBuilder { state.defaultMemberPermissions, state.dmPermission, @Suppress("DEPRECATION") state.defaultPermission, + integrationTypes = state.integrationTypes, + contexts = state.contexts, nsfw = state.nsfw, ) diff --git a/rest/src/commonMain/kotlin/builder/interaction/MessageCommandBuilders.kt b/rest/src/commonMain/kotlin/builder/interaction/MessageCommandBuilders.kt index 89bcacef64c..bc118bea53c 100644 --- a/rest/src/commonMain/kotlin/builder/interaction/MessageCommandBuilders.kt +++ b/rest/src/commonMain/kotlin/builder/interaction/MessageCommandBuilders.kt @@ -31,7 +31,8 @@ internal class MessageCommandModifyBuilderImpl : GlobalMessageCommandModifyBuild @Deprecated("'defaultPermission' is deprecated in favor of 'defaultMemberPermissions' and 'dmPermission'. Setting 'defaultPermission' to false can be replaced by setting 'defaultMemberPermissions' to empty Permissions and 'dmPermission' to false ('dmPermission' is only available for global commands).") override var defaultPermission: Boolean? by @Suppress("DEPRECATION") state::defaultPermission.delegate() - + override var integrationTypes: MutableList? by state::integrationTypes.delegate() + override var contexts: MutableList? by state::contexts.delegate() override var nsfw: Boolean? by state::nsfw.delegate() override fun toRequest(): ApplicationCommandModifyRequest { @@ -41,6 +42,8 @@ internal class MessageCommandModifyBuilderImpl : GlobalMessageCommandModifyBuild dmPermission = state.dmPermission, defaultMemberPermissions = state.defaultMemberPermissions, defaultPermission = @Suppress("DEPRECATION") state.defaultPermission, + integrationTypes = state.integrationTypes, + contexts = state.contexts, nsfw = state.nsfw, ) @@ -83,6 +86,8 @@ internal class MessageCommandCreateBuilderImpl(override var name: String) : Glob dmPermission = state.dmPermission, defaultMemberPermissions = state.defaultMemberPermissions, defaultPermission = @Suppress("DEPRECATION") state.defaultPermission, + integrationTypes = state.integrationTypes, + contexts = state.contexts, nsfw = state.nsfw, ) } diff --git a/rest/src/commonMain/kotlin/builder/interaction/UserCommandBuilders.kt b/rest/src/commonMain/kotlin/builder/interaction/UserCommandBuilders.kt index ccf956cecfa..bfead739ed1 100644 --- a/rest/src/commonMain/kotlin/builder/interaction/UserCommandBuilders.kt +++ b/rest/src/commonMain/kotlin/builder/interaction/UserCommandBuilders.kt @@ -27,7 +27,8 @@ internal class UserCommandModifyBuilderImpl : GlobalUserCommandModifyBuilder { override var defaultMemberPermissions: Permissions? by state::defaultMemberPermissions.delegate() @Suppress("OVERRIDE_DEPRECATION") override var dmPermission: Boolean? by state::dmPermission.delegate() - + override var integrationTypes: MutableList? by state::integrationTypes.delegate() + override var contexts: MutableList? by state::contexts.delegate() @Deprecated("'defaultPermission' is deprecated in favor of 'defaultMemberPermissions' and 'dmPermission'. Setting 'defaultPermission' to false can be replaced by setting 'defaultMemberPermissions' to empty Permissions and 'dmPermission' to false ('dmPermission' is only available for global commands).") override var defaultPermission: Boolean? by @Suppress("DEPRECATION") state::defaultPermission.delegate() @@ -40,6 +41,8 @@ internal class UserCommandModifyBuilderImpl : GlobalUserCommandModifyBuilder { dmPermission = state.dmPermission, defaultMemberPermissions = state.defaultMemberPermissions, defaultPermission = @Suppress("DEPRECATION") state.defaultPermission, + integrationTypes = state.integrationTypes, + contexts = state.contexts, nsfw = state.nsfw, ) } @@ -78,6 +81,8 @@ internal class UserCommandCreateBuilderImpl(override var name: String) : GlobalU defaultMemberPermissions = state.defaultMemberPermissions, dmPermission = state.dmPermission, defaultPermission = @Suppress("DEPRECATION") state.defaultPermission, + integrationTypes = state.integrationTypes, + contexts = state.contexts, nsfw = state.nsfw, ) } diff --git a/rest/src/commonMain/kotlin/json/request/InteractionsRequests.kt b/rest/src/commonMain/kotlin/json/request/InteractionsRequests.kt index f48beda6d53..5ee5f7c4950 100644 --- a/rest/src/commonMain/kotlin/json/request/InteractionsRequests.kt +++ b/rest/src/commonMain/kotlin/json/request/InteractionsRequests.kt @@ -25,6 +25,9 @@ public data class ApplicationCommandCreateRequest( @Deprecated("'defaultPermission' is deprecated in favor of 'defaultMemberPermissions' and 'dmPermission'. Setting 'defaultPermission' to false can be replaced by setting 'defaultMemberPermissions' to empty Permissions and 'dmPermission' to false ('dmPermission' is only available for global commands).") @SerialName("default_permission") val defaultPermission: OptionalBoolean = OptionalBoolean.Missing, + @SerialName("integration_types") + val integrationTypes: Optional> = Optional.Missing(), + val contexts: Optional?> = Optional.Missing(), val nsfw: OptionalBoolean = OptionalBoolean.Missing, ) @@ -44,6 +47,9 @@ public data class ApplicationCommandModifyRequest( @Deprecated("'defaultPermission' is deprecated in favor of 'defaultMemberPermissions' and 'dmPermission'. Setting 'defaultPermission' to false can be replaced by setting 'defaultMemberPermissions' to empty Permissions and 'dmPermission' to false ('dmPermission' is only available for global commands).") @SerialName("default_permission") val defaultPermission: OptionalBoolean = OptionalBoolean.Missing, + @SerialName("integration_types") + val integrationTypes: Optional> = Optional.Missing(), + val contexts: Optional?> = Optional.Missing(), val nsfw: OptionalBoolean = OptionalBoolean.Missing, )