commonMain.json.request.WebhookRequests.kt Maven / Gradle / Ivy
package dev.kord.rest.json.request
import dev.kord.common.entity.AllowedMentions
import dev.kord.common.entity.DiscordComponent
import dev.kord.common.entity.MessageFlags
import dev.kord.common.entity.Snowflake
import dev.kord.common.entity.optional.Optional
import dev.kord.common.entity.optional.OptionalBoolean
import dev.kord.common.entity.optional.OptionalSnowflake
import dev.kord.rest.NamedFile
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
public data class WebhookCreateRequest(val name: String, val avatar: Optional = Optional.Missing())
@Serializable
public data class WebhookModifyRequest(
val name: Optional = Optional.Missing(),
val avatar: Optional = Optional.Missing(),
@SerialName("channel_id")
val channelId: OptionalSnowflake = OptionalSnowflake.Missing
)
@Serializable
public data class WebhookExecuteRequest(
val content: Optional = Optional.Missing(),
val username: Optional = Optional.Missing(),
@SerialName("avatar_url")
val avatar: 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(),
@SerialName("thread_name")
val threadName: Optional = Optional.Missing(),
@SerialName("applied_tags")
val appliedTags: Optional> = Optional.Missing(),
)
public data class MultiPartWebhookExecuteRequest(
val request: WebhookExecuteRequest,
val files: List = emptyList(),
)
@Serializable
public data class WebhookEditMessageRequest(
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 MultipartWebhookEditMessageRequest(
val request: WebhookEditMessageRequest,
val files: List = emptyList(),
)