All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.json.request.InteractionsRequests.kt Maven / Gradle / Ivy

The newest version!
package dev.kord.rest.json.request

import dev.kord.common.Locale
import dev.kord.common.entity.*
import dev.kord.common.entity.optional.Optional
import dev.kord.common.entity.optional.OptionalBoolean
import dev.kord.rest.NamedFile
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
public data class ApplicationCommandCreateRequest(
    val name: String,
    @SerialName("name_localizations")
    val nameLocalizations: Optional?> = Optional.Missing(),
    val type: ApplicationCommandType,
    val description: Optional = Optional.Missing(),
    @SerialName("description_localizations")
    val descriptionLocalizations: Optional?> = Optional.Missing(),
    val options: Optional> = Optional.Missing(),
    @SerialName("default_member_permissions")
    public val defaultMemberPermissions: Optional = Optional.Missing(),
    @SerialName("dm_permission")
    public val dmPermission: OptionalBoolean? = OptionalBoolean.Missing,
    @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,
    val nsfw: OptionalBoolean = OptionalBoolean.Missing,
)

@Serializable
public data class ApplicationCommandModifyRequest(
    val name: Optional = Optional.Missing(),
    @SerialName("name_localizations")
    val nameLocalizations: Optional?> = Optional.Missing(),
    val description: Optional = Optional.Missing(),
    @SerialName("description_localizations")
    val descriptionLocalizations: Optional?> = Optional.Missing(),
    val options: Optional> = Optional.Missing(),
    @SerialName("default_member_permissions")
    public val defaultMemberPermissions: Optional = Optional.Missing(),
    @SerialName("dm_permission")
    public val dmPermission: OptionalBoolean? = OptionalBoolean.Missing,
    @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,
    val nsfw: OptionalBoolean = OptionalBoolean.Missing,
)

@Serializable
public data class InteractionResponseModifyRequest(
    val content: Optional = Optional.Missing(),
    val embeds: Optional?> = Optional.Missing(),
    @SerialName("allowed_mentions")
    val allowedMentions: Optional = Optional.Missing(),
    val flags: Optional = Optional.Missing(),
    val components: Optional?> = Optional.Missing(),
    val attachments: Optional?> = Optional.Missing(),
)

public data class MultipartInteractionResponseModifyRequest(
    val request: InteractionResponseModifyRequest,
    val files: List = emptyList(),
)

@Serializable
public data class InteractionResponseCreateRequest(
    val type: InteractionResponseType,
    val data: Optional = Optional.Missing()
)

@Serializable
public data class AutoCompleteResponseCreateRequest(
    val type: InteractionResponseType,
    val data: DiscordAutoComplete,
)

@Serializable
public data class ModalResponseCreateRequest(
    val type: InteractionResponseType,
    val data: DiscordModal
)

public data class MultipartInteractionResponseCreateRequest(
    val request: InteractionResponseCreateRequest,
    val files: List = emptyList(),
)

@Serializable
public data class InteractionApplicationCommandCallbackData(
    val tts: OptionalBoolean = OptionalBoolean.Missing,
    val content: Optional = Optional.Missing(),
    val embeds: Optional> = Optional.Missing(),
    @SerialName("allowed_mentions")
    val allowedMentions: Optional = Optional.Missing(),
    val flags: Optional = Optional.Missing(),
    val components: Optional> = Optional.Missing(),
    val attachments: Optional> = Optional.Missing(),
)

public data class MultipartFollowupMessageCreateRequest(
    val request: FollowupMessageCreateRequest,
    val files: List = emptyList(),
)

@Serializable
public data class FollowupMessageCreateRequest(
    val content: Optional = Optional.Missing(),
    val tts: OptionalBoolean = OptionalBoolean.Missing,
    val embeds: Optional> = Optional.Missing(),
    @SerialName("allowed_mentions")
    val allowedMentions: Optional = Optional.Missing(),
    val components: Optional> = Optional.Missing(),
    val attachments: Optional> = Optional.Missing(),
    val flags: Optional = Optional.Missing(),
)

@Serializable
public data class FollowupMessageModifyRequest(
    val content: Optional = Optional.Missing(),
    val embeds: Optional?> = Optional.Missing(),
    @SerialName("allowed_mentions")
    val allowedMentions: Optional = Optional.Missing(),
    val components: Optional?> = Optional.Missing(),
    val attachments: Optional?> = Optional.Missing(),
    val flags: Optional = Optional.Missing(),
)

public data class MultipartFollowupMessageModifyRequest(
    val request: FollowupMessageModifyRequest,
    val files: List = emptyList(),
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy