diff --git a/.github/workflows/deployment-ci.yml b/.github/workflows/deployment-ci.yml index 387731fe16b3..20f02ea035dc 100644 --- a/.github/workflows/deployment-ci.yml +++ b/.github/workflows/deployment-ci.yml @@ -28,8 +28,6 @@ jobs: with: distribution: temurin java-version: 8 - - name: Set SHORT_SHA environment variable to short commit hash - run: echo "SHORT_SHA=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV - name: Build with Gradle uses: gradle/gradle-build-action@v2 with: @@ -44,10 +42,8 @@ jobs: KORD_TEST_TOKEN: ${{ secrets.KORD_TEST_TOKEN }} NEXUS_USER: ${{ secrets.NEXUS_USER }} NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} - ORG_GRADLE_PROJECT_signingKey: ${{ secrets.signingKey }} - ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.signingPassword }} - GITHUB_TAG_NAME: ${{ github.event.release.tag_name }} - GITHUB_BRANCH_NAME: ${{ github.ref }} + SIGNING_KEY: ${{ secrets.signingKey }} + SIGNING_PASSWORD: ${{ secrets.signingPassword }} steps: - uses: actions/checkout@v3 with: @@ -57,8 +53,6 @@ jobs: with: distribution: temurin java-version: 8 - - name: Set SHORT_SHA environment variable to short commit hash - run: echo "SHORT_SHA=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV - name: Build with Gradle uses: gradle/gradle-build-action@v2 with: diff --git a/.github/workflows/docs-ci.yml b/.github/workflows/docs-ci.yml index ce1b70fb5fa3..60a35af52db6 100644 --- a/.github/workflows/docs-ci.yml +++ b/.github/workflows/docs-ci.yml @@ -1,8 +1,11 @@ -# This workflow will build and deploy docs to GitHub Pages whenever something is pushed to the default branch +# This workflow will build and deploy docs to GitHub Pages whenever something is pushed to the main branch name: Docs -on: push # but only to default branch, see if below +on: + push: + branches: + - main permissions: contents: write @@ -11,13 +14,9 @@ jobs: docs: name: Build and deploy docs runs-on: ubuntu-latest - if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) concurrency: # Allow one concurrent deployment group: pages cancel-in-progress: true - env: - GITHUB_TAG_NAME: ${{ github.event.release.tag_name }} - GITHUB_BRANCH_NAME: ${{ github.ref }} steps: - uses: actions/checkout@v3 - name: Set up JDK diff --git a/.gitignore b/.gitignore index e46f4d6a2cc7..12be4e7faed4 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ out/ **/build/* !**/build/generated/ # re-exclude BuildConfigGenerated.kt -common/build/generated/source/buildConfig/main/main/dev/kord/common/BuildConfigGenerated.kt +common/build/generated/sources/buildConfig/main/dev/kord/common/BuildConfigGenerated.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index d67996f7a22a..bc199de209f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,77 @@ +# 0.10.0 + +## Additions + +* Support new username system (by @lukellmann in #825) +* Add `Permission.UseExternalSounds` (by @lukellmann in #833) +* Add new error codes (by @lukellmann in #834) +* Add mention raid protection to Auto Moderation (by @lukellmann in #830) +* Add support for Application Role Connection Metadata (by @lukellmann in #836) +* Add support for join raid protection (by @lukellmann in #832) + +## Changes + +* Bump `DeprecationLevel`s (by @lukellmann in #821) +* Remove no longer needed pipeline interception (by @lukellmann in #824) +* Change `parentId` and `lockPermissionsToParent` to Optionals (by @Tmpod in #828) + +## Fixes + +* Fix deserializing embeds with `null` author url (by @lukellmann in #839) + +## Dependencies + +Updated in #826 + +* Kotlin 1.8.10 -> 1.8.21 +* Ktor 2.2.4 -> 2.3.0 +* kotlinx.coroutines 1.6.4 -> 1.7.1 +* kotlinx.serialization 1.5.0 -> 1.5.1 +* kotlin-node 18.14.0-pre.502 -> 18.16.3-pre.546 +* KSP 1.8.10-1.0.9 -> 1.8.21-1.0.11 +* KotlinPoet 1.12.0 -> 1.13.2 +* JUnit 5 5.9.2 -> 5.9.3 +* MockK 1.13.4 -> 1.13.5 +* AtomicFU 0.20.0 -> 0.20.2 +* Binary compatibility validator 0.13.0 -> 0.13.1 +* gradle-buildconfig-plugin 3.1.0 -> 4.0.4 + +## House-keeping + +* Simplify CI (by @lukellmann in #823) +* Use main as the permanent default branch (by @lukellmann in #831) + +# 0.9.0 + +## Additions + +* Support Kotlin/JS (by @DRSchlaubi and @Lukellmann in #775) +* Add support for voice messages (by @DRSchlaubi and @Lukellmann in #814) + +## Changes + +* Bump `DeprecationLevel`s (by @Lukellmann in #794) +* Replace `Icon` with `Asset` (by @oluiss and @Lukellmann in #703) + +## Fixes + +* Fix some `EntitySupplyStrategy` `toString`s being incorrect (by @GreemDev in #811) +* Fix List Nitro Sticker Packs endpoint (by @Lukellmann in #816) +* Fix `InstantInEpochMillisecondsSerializerTest` on JS (by @Lukellmann in #818) + +## Dependencies + +Updated in #783 + +* Gradle 8.0.2 -> 8.1 + +## House-keeping + +* Add inspection for missing `@KordDsl` (by @DRSchlaubi in #800) +* Fix Qodana findings (by @Lukellmann and @DRSchlaubi in #812) +* Clean up (by @Lukellmann in #813) +* Improve `GenerateKordEnum` and `AnnotationArguments` (by @Lukellmann in #817) + # 0.8.3 ## Additions diff --git a/README.md b/README.md index 26e6f3bf4b16..b3cff0e195e1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Discord](https://img.shields.io/discord/556525343595298817.svg?color=&label=Kord&logo=discord&style=for-the-badge)](https://discord.gg/6jcx5ev) [![Download](https://img.shields.io/maven-central/v/dev.kord/kord-core.svg?label=Maven%20Central&style=for-the-badge)](https://search.maven.org/search?q=g:%22dev.kord%22%20AND%20a:%22kord-core%22) -[![Github CI status (branch)](https://img.shields.io/github/actions/workflow/status/kordlib/kord/deployment-ci.yml?branch=0.9.x&label=CI&style=for-the-badge)]() +[![Github CI status (branch)](https://img.shields.io/github/actions/workflow/status/kordlib/kord/deployment-ci.yml?branch=main&label=CI&style=for-the-badge)]() __Kord is still in an experimental stage, as such we can't guarantee API stability between releases. While we'd love for you to try out our library, we don't recommend you use this in production just yet.__ @@ -61,7 +61,10 @@ Replace `{version}` with the latest version number on maven central. For Snapshots replace `{version}` with `{branch}-SNAPSHOT` -e.g: `0.9.x-SNAPSHOT` for the branch `0.9.x` or `feature-mpp-SNAPSHOT` for the branch `feature/mpp` +e.g: `feature-mpp-SNAPSHOT` for the branch `feature/mpp` + +For Snapshots for the branch `main` replace `{version}` with `{nextPlannedVersion}-SNAPSHOT` (see `nextPlannedVersion` +in [`gradle.properties`](gradle.properties)) [![Download](https://img.shields.io/maven-central/v/dev.kord/kord-core.svg?label=Maven%20Central&style=for-the-badge)](https://search.maven.org/search?q=g:%22dev.kord%22%20AND%20a:%22kord-core%22) diff --git a/bom/build.gradle.kts b/bom/build.gradle.kts index 77b98f1a3304..534d252b314d 100644 --- a/bom/build.gradle.kts +++ b/bom/build.gradle.kts @@ -1,6 +1,6 @@ plugins { `java-platform` - `kord-publishing` + `maven-publish` } val me = project @@ -27,7 +27,9 @@ dependencies { } publishing { - publications.withType().configureEach { + publications.register(Library.name) { from(components["javaPlatform"]) } } + +apply(plugin = "kord-publishing") diff --git a/build.gradle.kts b/build.gradle.kts index a1cd46774e82..0ad64bff26f7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,4 +7,4 @@ repositories { } group = Library.group -version = Library.version +version = libraryVersion diff --git a/buildSrc/src/main/kotlin/Compiler.kt b/buildSrc/src/main/kotlin/Compiler.kt index 3d4cc2614d16..97fed44a4643 100644 --- a/buildSrc/src/main/kotlin/Compiler.kt +++ b/buildSrc/src/main/kotlin/Compiler.kt @@ -1,6 +1,7 @@ import kotlinx.atomicfu.plugin.gradle.AtomicFUPluginExtension import org.gradle.api.Project import org.gradle.api.artifacts.VersionCatalogsExtension +import org.gradle.kotlin.dsl.assign import org.gradle.kotlin.dsl.configure import org.gradle.kotlin.dsl.getByType import org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerOptions @@ -11,7 +12,6 @@ object OptIns { } val kordOptIns = listOf( - "kotlin.time.ExperimentalTime", "kotlin.contracts.ExperimentalContracts", "dev.kord.common.annotation.KordInternal", @@ -25,13 +25,13 @@ object Jvm { } fun KotlinCommonCompilerOptions.applyKordCompilerOptions() { - // TODO: set to true again once https://github.com/Kotlin/kotlinx-atomicfu/issues/289 is fixed - allWarningsAsErrors.set(false) - freeCompilerArgs.add("-progressive") + allWarningsAsErrors = true + progressiveMode = true } fun KotlinSourceSet.applyKordOptIns() { languageSettings { + // allow `ExperimentalCoroutinesApi` for `TestScope.currentTime` if ("Test" in name) optIn(OptIns.coroutines) kordOptIns.forEach(::optIn) } diff --git a/buildSrc/src/main/kotlin/Documentation.kt b/buildSrc/src/main/kotlin/Documentation.kt index db5da77659e5..090ed8310b63 100644 --- a/buildSrc/src/main/kotlin/Documentation.kt +++ b/buildSrc/src/main/kotlin/Documentation.kt @@ -1,19 +1,23 @@ +import org.gradle.kotlin.dsl.assign import org.jetbrains.dokka.gradle.AbstractDokkaLeafTask import java.net.URL fun AbstractDokkaLeafTask.applyKordDokkaOptions() { - failOnWarning.set(true) + + moduleName = "kord-${project.name}" + + failOnWarning = true dokkaSourceSets.configureEach { - jdkVersion.set(Jvm.target) + jdkVersion = Jvm.target - suppressGeneratedFiles.set(false) + suppressGeneratedFiles = false sourceLink { - localDirectory.set(project.projectDir) - remoteUrl.set(URL("https://github.com/kordlib/kord/blob/${Library.commitHashOrDefault("0.9.x")}/${project.name}")) - remoteLineSuffix.set("#L") + localDirectory = project.projectDir + remoteUrl = URL("https://github.com/kordlib/kord/blob/${project.commitHash}/${project.name}") + remoteLineSuffix = "#L" } externalDocumentationLink("https://kotlinlang.org/api/kotlinx.coroutines/") @@ -26,8 +30,8 @@ fun AbstractDokkaLeafTask.applyKordDokkaOptions() { // don't list `TweetNaclFast` in docs perPackageOption { - matchingRegex.set("""com\.iwebpp\.crypto""") - suppress.set(true) + matchingRegex = """com\.iwebpp\.crypto""" + suppress = true } } } diff --git a/buildSrc/src/main/kotlin/Git.kt b/buildSrc/src/main/kotlin/Git.kt new file mode 100644 index 000000000000..321fe3fbbc1c --- /dev/null +++ b/buildSrc/src/main/kotlin/Git.kt @@ -0,0 +1,13 @@ +import org.gradle.api.Project +import java.io.ByteArrayOutputStream + +internal fun Project.git(vararg command: String): String { + val output = ByteArrayOutputStream() + exec { + commandLine("git", *command) + standardOutput = output + errorOutput = output + workingDir = rootDir + }.rethrowFailure().assertNormalExitValue() + return output.toString().trim() +} diff --git a/buildSrc/src/main/kotlin/Projects.kt b/buildSrc/src/main/kotlin/Projects.kt index 77a8c531dd39..be8c41f12ee3 100644 --- a/buildSrc/src/main/kotlin/Projects.kt +++ b/buildSrc/src/main/kotlin/Projects.kt @@ -1,40 +1,31 @@ -/** - * whether the process has been invoked by JitPack - */ -val isJitPack get() = "true" == System.getenv("JITPACK") +import org.gradle.api.Project object Library { const val name = "kord" const val group = "dev.kord" - val version: String - get() = if (isJitPack) System.getenv("RELEASE_TAG") - else { - val tag = System.getenv("GITHUB_TAG_NAME") - val branch = System.getenv("GITHUB_BRANCH_NAME") - when { - !tag.isNullOrBlank() -> tag - !branch.isNullOrBlank() && branch.startsWith("refs/heads/") -> - branch.substringAfter("refs/heads/").replace("/", "-") + "-SNAPSHOT" - else -> "undefined" - } - - } - - val commitHash get() = System.getenv("GITHUB_SHA") ?: "unknown" - fun commitHashOrDefault(default: String) = System.getenv("GITHUB_SHA") ?: default - - // this environment variable isn't available out of the box, we set it ourselves - val shortCommitHash get() = System.getenv("SHORT_SHA") ?: "unknown" - const val description = "Idiomatic Kotlin Wrapper for The Discord API" const val projectUrl = "https://github.com/kordlib/kord" +} - val isSnapshot: Boolean get() = version.endsWith("-SNAPSHOT") +private val Project.tag + get() = git("tag", "--no-column", "--points-at", "HEAD") + .takeIf { it.isNotBlank() } + ?.lines() + ?.single() + +val Project.libraryVersion + get() = tag ?: run { + val snapshotPrefix = when (val branch = git("branch", "--show-current")) { + "main" -> providers.gradleProperty("nextPlannedVersion").get() + else -> branch.replace('/', '-') + } + "$snapshotPrefix-SNAPSHOT" + } - val isRelease: Boolean get() = !isSnapshot && !isUndefined +val Project.commitHash get() = git("rev-parse", "--verify", "HEAD") +val Project.shortCommitHash get() = git("rev-parse", "--short", "HEAD") - val isUndefined get() = version == "undefined" -} +val Project.isRelease get() = tag != null object Repo { const val releasesUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" diff --git a/buildSrc/src/main/kotlin/kord-internal-module.gradle.kts b/buildSrc/src/main/kotlin/kord-internal-module.gradle.kts index b61a5411875d..102f730ea2ee 100644 --- a/buildSrc/src/main/kotlin/kord-internal-module.gradle.kts +++ b/buildSrc/src/main/kotlin/kord-internal-module.gradle.kts @@ -1,5 +1,3 @@ -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile - plugins { org.jetbrains.kotlin.jvm } @@ -10,9 +8,6 @@ repositories { kotlin { jvmToolchain(Jvm.target) -} - -tasks.withType().configureEach { compilerOptions { applyKordCompilerOptions() } diff --git a/buildSrc/src/main/kotlin/kord-module.gradle.kts b/buildSrc/src/main/kotlin/kord-module.gradle.kts index 1c7608680a4b..bb56104574fb 100644 --- a/buildSrc/src/main/kotlin/kord-module.gradle.kts +++ b/buildSrc/src/main/kotlin/kord-module.gradle.kts @@ -28,8 +28,13 @@ kotlin { jvmToolchain(Jvm.target) + compilerOptions { + applyKordCompilerOptions() + optIn.addAll(kordOptIns) + } + sourceSets { - // allow `ExperimentalCoroutinesApi` for `runTest {}` + // allow `ExperimentalCoroutinesApi` for `TestScope.currentTime` test { languageSettings.optIn(OptIns.coroutines) } } } @@ -37,13 +42,6 @@ kotlin { configureAtomicFU() tasks { - withType().configureEach { - compilerOptions { - applyKordCompilerOptions() - freeCompilerArgs.addAll(kordOptIns.map { "-opt-in=$it" }) - } - } - withType().configureEach { useJUnitPlatform() } @@ -51,10 +49,6 @@ tasks { withType().configureEach { applyKordDokkaOptions() } - - withType().configureEach { - doFirst { require(!Library.isUndefined) { "No release/snapshot version found." } } - } } publishing { diff --git a/buildSrc/src/main/kotlin/kord-multiplatform-module.gradle.kts b/buildSrc/src/main/kotlin/kord-multiplatform-module.gradle.kts index b33a4e65cfc6..ea4cbbf586f0 100644 --- a/buildSrc/src/main/kotlin/kord-multiplatform-module.gradle.kts +++ b/buildSrc/src/main/kotlin/kord-multiplatform-module.gradle.kts @@ -81,6 +81,12 @@ tasks { } } + afterEvaluate { + named("sourcesJar") { + dependsOn("kspCommonMainKotlinMetadata") + } + } + withType().configureEach { applyKordDokkaOptions() dependsOn("kspCommonMainKotlinMetadata") diff --git a/buildSrc/src/main/kotlin/kord-publishing.gradle.kts b/buildSrc/src/main/kotlin/kord-publishing.gradle.kts index 593dd1348b86..a001f7113cc7 100644 --- a/buildSrc/src/main/kotlin/kord-publishing.gradle.kts +++ b/buildSrc/src/main/kotlin/kord-publishing.gradle.kts @@ -1,3 +1,4 @@ +import java.lang.System.getenv import java.util.Base64 plugins { @@ -5,77 +6,74 @@ plugins { signing } -val dokkaJar by tasks.registering(Jar::class) { - archiveClassifier.set("javadoc") - from(tasks.named("dokkaHtml")) -} +fun MavenPublication.registerDokkaJar() = + tasks.register("${name}DokkaJar") { + archiveClassifier = "javadoc" + destinationDirectory = destinationDirectory.get().dir(name) + from(tasks.named("dokkaHtml")) + } publishing { publications { withType().configureEach { - artifact(dokkaJar) + if (project.name != "bom") artifact(registerDokkaJar()) + groupId = Library.group artifactId = "kord-$artifactId" - version = Library.version + version = libraryVersion pom { - name.set(Library.name) - description.set(Library.description) - url.set(Library.projectUrl) + name = Library.name + description = Library.description + url = Library.projectUrl organization { - name.set("Kord") - url.set("https://github.com/kordlib") + name = "Kord" + url = "https://github.com/kordlib" } developers { developer { - name.set("The Kord Team") + name = "The Kord Team" } } issueManagement { - system.set("GitHub") - url.set("https://github.com/kordlib/kord/issues") + system = "GitHub" + url = "https://github.com/kordlib/kord/issues" } licenses { license { - name.set("MIT") - url.set("http://opensource.org/licenses/MIT") + name = "MIT" + url = "https://opensource.org/licenses/MIT" } } scm { - connection.set("scm:git:ssh://github.com/kordlib/kord.git") - developerConnection.set("scm:git:ssh://git@github.com:kordlib/kord.git") - url.set(Library.projectUrl) + connection = "scm:git:ssh://github.com/kordlib/kord.git" + developerConnection = "scm:git:ssh://git@github.com:kordlib/kord.git" + url = Library.projectUrl } } } } - if (!isJitPack) { - repositories { - maven { - url = uri(if (Library.isSnapshot) Repo.snapshotsUrl else Repo.releasesUrl) + repositories { + maven { + url = uri(if (isRelease) Repo.releasesUrl else Repo.snapshotsUrl) - credentials { - username = System.getenv("NEXUS_USER") - password = System.getenv("NEXUS_PASSWORD") - } + credentials { + username = getenv("NEXUS_USER") + password = getenv("NEXUS_PASSWORD") } } } } -if (!isJitPack && Library.isRelease) { - signing { - val signingKey = findProperty("signingKey")?.toString() - val signingPassword = findProperty("signingPassword")?.toString() - if (signingKey != null && signingPassword != null) { - useInMemoryPgpKeys(String(Base64.getDecoder().decode(signingKey)), signingPassword) - } - sign(publishing.publications[Library.name]) - } +signing { + val secretKey = getenv("SIGNING_KEY")?.let { String(Base64.getDecoder().decode(it)) } + val password = getenv("SIGNING_PASSWORD") + useInMemoryPgpKeys(secretKey, password) + sign(publishing.publications) } diff --git a/common/api/common.api b/common/api/common.api index 42028ff4097b..a2493be761ec 100644 --- a/common/api/common.api +++ b/common/api/common.api @@ -70,6 +70,7 @@ public final class dev/kord/common/DiscordTimestampStyle : java/lang/Enum { public static final field ShortDate Ldev/kord/common/DiscordTimestampStyle; public static final field ShortDateTime Ldev/kord/common/DiscordTimestampStyle; public static final field ShortTime Ldev/kord/common/DiscordTimestampStyle; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getStyle ()Ljava/lang/String; public static fun valueOf (Ljava/lang/String;)Ldev/kord/common/DiscordTimestampStyle; public static fun values ()[Ldev/kord/common/DiscordTimestampStyle; @@ -89,10 +90,6 @@ public final class dev/kord/common/KordConstants { public static final field INSTANCE Ldev/kord/common/KordConstants; public final fun getCOMMIT_HASH ()Ljava/lang/String; public final fun getGITHUB_URL ()Ljava/lang/String; - public final fun getKORD_COMMIT_HASH ()Ljava/lang/String; - public final fun getKORD_GITHUB_URL ()Ljava/lang/String; - public final fun getKORD_SHORT_COMMIT_HASH ()Ljava/lang/String; - public final fun getKORD_VERSION ()Ljava/lang/String; public final fun getSHORT_COMMIT_HASH ()Ljava/lang/String; public final fun getUSER_AGENT ()Ljava/lang/String; public final fun getVERSION ()Ljava/lang/String; @@ -193,6 +190,7 @@ public final class dev/kord/common/entity/ActivityFlag : java/lang/Enum { public static final field Play Ldev/kord/common/entity/ActivityFlag; public static final field Spectate Ldev/kord/common/entity/ActivityFlag; public static final field Sync Ldev/kord/common/entity/ActivityFlag; + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun getValue ()I public static fun valueOf (Ljava/lang/String;)Ldev/kord/common/entity/ActivityFlag; public static fun values ()[Ldev/kord/common/entity/ActivityFlag; @@ -211,39 +209,17 @@ public final class dev/kord/common/entity/ActivityFlags$Companion { } public abstract class dev/kord/common/entity/ActivityType { - public static final field ActivityTypeSerializer Ldev/kord/common/entity/ActivityType$ActivityTypeSerializer; public static final field Companion Ldev/kord/common/entity/ActivityType$Companion; - public static final field Competing Ldev/kord/common/entity/ActivityType; - public static final field Custom Ldev/kord/common/entity/ActivityType; - public static final field Game Ldev/kord/common/entity/ActivityType; - public static final field Listening Ldev/kord/common/entity/ActivityType; - public static final field Streaming Ldev/kord/common/entity/ActivityType; - public static final field Unknown Ldev/kord/common/entity/ActivityType; - public static final field Watching Ldev/kord/common/entity/ActivityType; public synthetic fun (ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun equals (Ljava/lang/Object;)Z public final fun getCode ()I public final fun hashCode ()I public final fun toString ()Ljava/lang/String; - public static synthetic fun valueOf (Ljava/lang/String;)Ldev/kord/common/entity/ActivityType; - public static synthetic fun values ()[Ldev/kord/common/entity/ActivityType; -} - -public final class dev/kord/common/entity/ActivityType$ActivityTypeSerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Ldev/kord/common/entity/ActivityType$ActivityTypeSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/kord/common/entity/ActivityType; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/kord/common/entity/ActivityType;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public final synthetic fun serializer ()Lkotlinx/serialization/KSerializer; } public final class dev/kord/common/entity/ActivityType$Companion { public final fun getEntries ()Ljava/util/List; public final fun serializer ()Lkotlinx/serialization/KSerializer; - public synthetic fun valueOf (Ljava/lang/String;)Ldev/kord/common/entity/ActivityType; - public synthetic fun values ()[Ldev/kord/common/entity/ActivityType; } public final class dev/kord/common/entity/ActivityType$Competing : dev/kord/common/entity/ActivityType { @@ -290,7 +266,7 @@ public final class dev/kord/common/entity/AllRemovedMessageReactions { public final fun getMessageId ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/AllRemovedMessageReactions;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/AllRemovedMessageReactions;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/AllRemovedMessageReactions$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -356,7 +332,7 @@ public final class dev/kord/common/entity/AllowedMentions { public final fun getUsers ()Ljava/util/List; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/AllowedMentions;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/AllowedMentions;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/AllowedMentions$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -414,7 +390,7 @@ public final class dev/kord/common/entity/ApplicationCommandOption { public final fun getType ()Ldev/kord/common/entity/ApplicationCommandOptionType; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/ApplicationCommandOption;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/ApplicationCommandOption;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/ApplicationCommandOption$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -566,6 +542,7 @@ public final class dev/kord/common/entity/ApplicationFlag : java/lang/Enum { public static final field GatewayPresenceLimited Ldev/kord/common/entity/ApplicationFlag; public static final field VerificationPendingGuildLimit Ldev/kord/common/entity/ApplicationFlag; public final fun getCode ()I + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun plus (Ldev/kord/common/entity/ApplicationFlag;)Ldev/kord/common/entity/ApplicationFlags; public final fun plus (Ldev/kord/common/entity/ApplicationFlags;)Ldev/kord/common/entity/ApplicationFlags; public static fun valueOf (Ljava/lang/String;)Ldev/kord/common/entity/ApplicationFlag; @@ -606,6 +583,56 @@ public final class dev/kord/common/entity/ApplicationFlags$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public abstract class dev/kord/common/entity/ApplicationRoleConnectionMetadataType { + public static final field Companion Ldev/kord/common/entity/ApplicationRoleConnectionMetadataType$Companion; + public synthetic fun (ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun equals (Ljava/lang/Object;)Z + public final fun getValue ()I + public final fun hashCode ()I + public final fun toString ()Ljava/lang/String; +} + +public final class dev/kord/common/entity/ApplicationRoleConnectionMetadataType$BooleanEqual : dev/kord/common/entity/ApplicationRoleConnectionMetadataType { + public static final field INSTANCE Ldev/kord/common/entity/ApplicationRoleConnectionMetadataType$BooleanEqual; +} + +public final class dev/kord/common/entity/ApplicationRoleConnectionMetadataType$BooleanNotEqual : dev/kord/common/entity/ApplicationRoleConnectionMetadataType { + public static final field INSTANCE Ldev/kord/common/entity/ApplicationRoleConnectionMetadataType$BooleanNotEqual; +} + +public final class dev/kord/common/entity/ApplicationRoleConnectionMetadataType$Companion { + public final fun getEntries ()Ljava/util/List; + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/kord/common/entity/ApplicationRoleConnectionMetadataType$DateTimeGreaterThanOrEqual : dev/kord/common/entity/ApplicationRoleConnectionMetadataType { + public static final field INSTANCE Ldev/kord/common/entity/ApplicationRoleConnectionMetadataType$DateTimeGreaterThanOrEqual; +} + +public final class dev/kord/common/entity/ApplicationRoleConnectionMetadataType$DateTimeLessThanOrEqual : dev/kord/common/entity/ApplicationRoleConnectionMetadataType { + public static final field INSTANCE Ldev/kord/common/entity/ApplicationRoleConnectionMetadataType$DateTimeLessThanOrEqual; +} + +public final class dev/kord/common/entity/ApplicationRoleConnectionMetadataType$IntegerEqual : dev/kord/common/entity/ApplicationRoleConnectionMetadataType { + public static final field INSTANCE Ldev/kord/common/entity/ApplicationRoleConnectionMetadataType$IntegerEqual; +} + +public final class dev/kord/common/entity/ApplicationRoleConnectionMetadataType$IntegerGreaterThanOrEqual : dev/kord/common/entity/ApplicationRoleConnectionMetadataType { + public static final field INSTANCE Ldev/kord/common/entity/ApplicationRoleConnectionMetadataType$IntegerGreaterThanOrEqual; +} + +public final class dev/kord/common/entity/ApplicationRoleConnectionMetadataType$IntegerLessThanOrEqual : dev/kord/common/entity/ApplicationRoleConnectionMetadataType { + public static final field INSTANCE Ldev/kord/common/entity/ApplicationRoleConnectionMetadataType$IntegerLessThanOrEqual; +} + +public final class dev/kord/common/entity/ApplicationRoleConnectionMetadataType$IntegerNotEqual : dev/kord/common/entity/ApplicationRoleConnectionMetadataType { + public static final field INSTANCE Ldev/kord/common/entity/ApplicationRoleConnectionMetadataType$IntegerNotEqual; +} + +public final class dev/kord/common/entity/ApplicationRoleConnectionMetadataType$Unknown : dev/kord/common/entity/ApplicationRoleConnectionMetadataType { + public fun (I)V +} + public abstract class dev/kord/common/entity/ArchiveDuration { public static final field Companion Ldev/kord/common/entity/ArchiveDuration$Companion; public synthetic fun (JLkotlin/jvm/internal/DefaultConstructorMarker;)V @@ -617,7 +644,6 @@ public abstract class dev/kord/common/entity/ArchiveDuration { public final class dev/kord/common/entity/ArchiveDuration$Companion { public final fun getEntries ()Ljava/util/List; - public final synthetic fun getValues ()Ljava/util/Set; public final fun serializer ()Lkotlinx/serialization/KSerializer; } @@ -629,15 +655,6 @@ public final class dev/kord/common/entity/ArchiveDuration$Hour : dev/kord/common public static final field INSTANCE Ldev/kord/common/entity/ArchiveDuration$Hour; } -public final class dev/kord/common/entity/ArchiveDuration$Serializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Ldev/kord/common/entity/ArchiveDuration$Serializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/kord/common/entity/ArchiveDuration; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/kord/common/entity/ArchiveDuration;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V -} - public final class dev/kord/common/entity/ArchiveDuration$ThreeDays : dev/kord/common/entity/ArchiveDuration { public static final field INSTANCE Ldev/kord/common/entity/ArchiveDuration$ThreeDays; } @@ -955,7 +972,7 @@ public final class dev/kord/common/entity/AuditLogEntryOptionalInfo { public final fun getType ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/AuditLogEntryOptionalInfo;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/AuditLogEntryOptionalInfo;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/AuditLogEntryOptionalInfo$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -1336,6 +1353,7 @@ public abstract interface class dev/kord/common/entity/BaseDiscordApplication { public abstract fun getOwner ()Ldev/kord/common/entity/optional/Optional; public abstract fun getPrimarySkuId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public abstract fun getPrivacyPolicyUrl ()Ldev/kord/common/entity/optional/Optional; + public abstract fun getRoleConnectionsVerificationUrl ()Ldev/kord/common/entity/optional/Optional; public abstract fun getRpcOrigins ()Ldev/kord/common/entity/optional/Optional; public abstract fun getSlug ()Ldev/kord/common/entity/optional/Optional; public abstract fun getTags ()Ldev/kord/common/entity/optional/Optional; @@ -1373,7 +1391,7 @@ public final class dev/kord/common/entity/BulkDeleteData { public final fun getIds ()Ljava/util/List; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/BulkDeleteData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/BulkDeleteData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/BulkDeleteData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -1393,7 +1411,6 @@ public final class dev/kord/common/entity/BulkDeleteData$Companion { public abstract class dev/kord/common/entity/ButtonStyle { public static final field Companion Ldev/kord/common/entity/ButtonStyle$Companion; - public static final field Serializer Ldev/kord/common/entity/ButtonStyle$Serializer; public synthetic fun (ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun equals (Ljava/lang/Object;)Z public final fun getValue ()I @@ -1422,16 +1439,6 @@ public final class dev/kord/common/entity/ButtonStyle$Secondary : dev/kord/commo public static final field INSTANCE Ldev/kord/common/entity/ButtonStyle$Secondary; } -public final class dev/kord/common/entity/ButtonStyle$Serializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Ldev/kord/common/entity/ButtonStyle$Serializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/kord/common/entity/ButtonStyle; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/kord/common/entity/ButtonStyle;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public final synthetic fun serializer ()Lkotlinx/serialization/KSerializer; -} - public final class dev/kord/common/entity/ButtonStyle$Success : dev/kord/common/entity/ButtonStyle { public static final field INSTANCE Ldev/kord/common/entity/ButtonStyle$Success; } @@ -1444,6 +1451,7 @@ public final class dev/kord/common/entity/ChannelFlag : java/lang/Enum { public static final field Pinned Ldev/kord/common/entity/ChannelFlag; public static final field RequireTag Ldev/kord/common/entity/ChannelFlag; public final fun getCode ()I + public static fun getEntries ()Lkotlin/enums/EnumEntries; public final fun plus (Ldev/kord/common/entity/ChannelFlag;)Ldev/kord/common/entity/ChannelFlags; public final fun plus (Ldev/kord/common/entity/ChannelFlags;)Ldev/kord/common/entity/ChannelFlags; public static fun valueOf (Ljava/lang/String;)Ldev/kord/common/entity/ChannelFlag; @@ -1561,22 +1569,6 @@ public final class dev/kord/common/entity/Choice$Companion { public final fun serializer (Lkotlinx/serialization/KSerializer;)Lkotlinx/serialization/KSerializer; } -public final class dev/kord/common/entity/Choice$IntChoice : dev/kord/common/entity/Choice { - public fun (Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;J)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ldev/kord/common/entity/optional/Optional; - public final fun component3 ()J - public final fun copy (Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;J)Ldev/kord/common/entity/Choice$IntChoice; - public static synthetic fun copy$default (Ldev/kord/common/entity/Choice$IntChoice;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;JILjava/lang/Object;)Ldev/kord/common/entity/Choice$IntChoice; - public fun equals (Ljava/lang/Object;)Z - public fun getName ()Ljava/lang/String; - public fun getNameLocalizations ()Ldev/kord/common/entity/optional/Optional; - public fun getValue ()Ljava/lang/Long; - public synthetic fun getValue ()Ljava/lang/Object; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; -} - public final class dev/kord/common/entity/Choice$IntegerChoice : dev/kord/common/entity/Choice { public fun (Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;J)V public final fun component1 ()Ljava/lang/String; @@ -1832,7 +1824,6 @@ public final class dev/kord/common/entity/CommandGroup : dev/kord/common/entity/ public abstract class dev/kord/common/entity/ComponentType { public static final field Companion Ldev/kord/common/entity/ComponentType$Companion; - public static final field Serializer Ldev/kord/common/entity/ComponentType$Serializer; public synthetic fun (ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun equals (Ljava/lang/Object;)Z public final fun getValue ()I @@ -1865,20 +1856,6 @@ public final class dev/kord/common/entity/ComponentType$RoleSelect : dev/kord/co public static final field INSTANCE Ldev/kord/common/entity/ComponentType$RoleSelect; } -public final class dev/kord/common/entity/ComponentType$SelectMenu : dev/kord/common/entity/ComponentType { - public static final field INSTANCE Ldev/kord/common/entity/ComponentType$SelectMenu; -} - -public final class dev/kord/common/entity/ComponentType$Serializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Ldev/kord/common/entity/ComponentType$Serializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/kord/common/entity/ComponentType; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/kord/common/entity/ComponentType;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public final synthetic fun serializer ()Lkotlinx/serialization/KSerializer; -} - public final class dev/kord/common/entity/ComponentType$StringSelect : dev/kord/common/entity/ComponentType { public static final field INSTANCE Ldev/kord/common/entity/ComponentType$StringSelect; } @@ -1934,7 +1911,7 @@ public final class dev/kord/common/entity/DefaultReaction { public final fun getEmojiName ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DefaultReaction;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DefaultReaction;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DefaultReaction$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -1968,7 +1945,7 @@ public final class dev/kord/common/entity/DeletedMessage { public final fun getId ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DeletedMessage;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DeletedMessage;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DeletedMessage$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2026,7 +2003,7 @@ public final class dev/kord/common/entity/DiscordActivity { public final fun getUrl ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordActivity;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordActivity;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordActivity$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2063,7 +2040,7 @@ public final class dev/kord/common/entity/DiscordActivityAssets { public final fun getSmallText ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordActivityAssets;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordActivityAssets;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordActivityAssets$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2097,7 +2074,7 @@ public final class dev/kord/common/entity/DiscordActivityEmoji { public final fun getName ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordActivityEmoji;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordActivityEmoji;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordActivityEmoji$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2130,7 +2107,7 @@ public final class dev/kord/common/entity/DiscordActivityParty { public final fun getSize ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordActivityParty;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordActivityParty;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordActivityParty$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2183,7 +2160,7 @@ public final class dev/kord/common/entity/DiscordActivitySecrets { public final fun getSpectate ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordActivitySecrets;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordActivitySecrets;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordActivitySecrets$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2216,7 +2193,7 @@ public final class dev/kord/common/entity/DiscordActivityTimestamps { public final fun getStart ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordActivityTimestamps;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordActivityTimestamps;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordActivityTimestamps$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2266,7 +2243,7 @@ public final class dev/kord/common/entity/DiscordAddedGuildMember { public final fun getUser ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordAddedGuildMember;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordAddedGuildMember;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordAddedGuildMember$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2286,9 +2263,9 @@ public final class dev/kord/common/entity/DiscordAddedGuildMember$Companion { public final class dev/kord/common/entity/DiscordApplication : dev/kord/common/entity/BaseDiscordApplication { public static final field Companion Ldev/kord/common/entity/DiscordApplication$Companion; - public synthetic fun (ILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/DiscordTeam;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/DiscordTeam;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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;)V - public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/DiscordTeam;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (ILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/DiscordTeam;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/Optional;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/DiscordTeam;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/Optional;)V + public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/DiscordTeam;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/Optional;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/kord/common/entity/Snowflake; public final fun component10 ()Ldev/kord/common/entity/optional/Optional; public final fun component11 ()Ljava/lang/String; @@ -2302,6 +2279,7 @@ public final class dev/kord/common/entity/DiscordApplication : dev/kord/common/e public final fun component19 ()Ldev/kord/common/entity/optional/Optional; public final fun component2 ()Ljava/lang/String; public final fun component20 ()Ldev/kord/common/entity/optional/Optional; + public final fun component21 ()Ldev/kord/common/entity/optional/Optional; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ljava/lang/String; public final fun component5 ()Ldev/kord/common/entity/optional/Optional; @@ -2309,8 +2287,8 @@ public final class dev/kord/common/entity/DiscordApplication : dev/kord/common/e public final fun component7 ()Z public final fun component8 ()Ldev/kord/common/entity/optional/Optional; public final fun component9 ()Ldev/kord/common/entity/optional/Optional; - public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/DiscordTeam;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/DiscordApplication; - public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordApplication;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/DiscordTeam;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordApplication; + public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/DiscordTeam;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/Optional;)Ldev/kord/common/entity/DiscordApplication; + public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordApplication;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/DiscordTeam;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/Optional;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordApplication; public fun equals (Ljava/lang/Object;)Z public final fun getBotPublic ()Z public final fun getBotRequireCodeGrant ()Z @@ -2326,6 +2304,7 @@ public final class dev/kord/common/entity/DiscordApplication : dev/kord/common/e public fun getOwner ()Ldev/kord/common/entity/optional/Optional; public fun getPrimarySkuId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public fun getPrivacyPolicyUrl ()Ldev/kord/common/entity/optional/Optional; + public fun getRoleConnectionsVerificationUrl ()Ldev/kord/common/entity/optional/Optional; public fun getRpcOrigins ()Ldev/kord/common/entity/optional/Optional; public fun getSlug ()Ldev/kord/common/entity/optional/Optional; public fun getTags ()Ldev/kord/common/entity/optional/Optional; @@ -2334,7 +2313,7 @@ public final class dev/kord/common/entity/DiscordApplication : dev/kord/common/e public fun getVerifyKey ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordApplication;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordApplication;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordApplication$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2390,7 +2369,7 @@ public final class dev/kord/common/entity/DiscordApplicationCommand { public final fun getVersion ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordApplicationCommand;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordApplicationCommand;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordApplicationCommand$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2416,13 +2395,55 @@ public final class dev/kord/common/entity/DiscordApplicationKt { public static final fun ApplicationFlagsWithIterable (Ljava/lang/Iterable;)Ldev/kord/common/entity/ApplicationFlags; } +public final class dev/kord/common/entity/DiscordApplicationRoleConnectionMetadata { + public static final field Companion Ldev/kord/common/entity/DiscordApplicationRoleConnectionMetadata$Companion; + public synthetic fun (ILdev/kord/common/entity/ApplicationRoleConnectionMetadataType;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ldev/kord/common/entity/ApplicationRoleConnectionMetadataType;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;)V + public synthetic fun (Ldev/kord/common/entity/ApplicationRoleConnectionMetadataType;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ldev/kord/common/entity/ApplicationRoleConnectionMetadataType; + public final fun component2 ()Ljava/lang/String; + public final fun component3 ()Ljava/lang/String; + public final fun component4 ()Ldev/kord/common/entity/optional/Optional; + public final fun component5 ()Ljava/lang/String; + public final fun component6 ()Ldev/kord/common/entity/optional/Optional; + public final fun copy (Ldev/kord/common/entity/ApplicationRoleConnectionMetadataType;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;)Ldev/kord/common/entity/DiscordApplicationRoleConnectionMetadata; + public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordApplicationRoleConnectionMetadata;Ldev/kord/common/entity/ApplicationRoleConnectionMetadataType;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordApplicationRoleConnectionMetadata; + public fun equals (Ljava/lang/Object;)Z + public final fun getDescription ()Ljava/lang/String; + public final fun getDescriptionLocalizations ()Ldev/kord/common/entity/optional/Optional; + public final fun getKey ()Ljava/lang/String; + public final fun getName ()Ljava/lang/String; + public final fun getNameLocalizations ()Ldev/kord/common/entity/optional/Optional; + public final fun getType ()Ldev/kord/common/entity/ApplicationRoleConnectionMetadataType; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordApplicationRoleConnectionMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class dev/kord/common/entity/DiscordApplicationRoleConnectionMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/kord/common/entity/DiscordApplicationRoleConnectionMetadata$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/kord/common/entity/DiscordApplicationRoleConnectionMetadata; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/kord/common/entity/DiscordApplicationRoleConnectionMetadata;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class dev/kord/common/entity/DiscordApplicationRoleConnectionMetadata$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + public final class dev/kord/common/entity/DiscordAttachment { public static final field Companion Ldev/kord/common/entity/DiscordAttachment$Companion; - public synthetic fun (ILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;)V - public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (ILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;)V + public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/kord/common/entity/Snowflake; public final fun component10 ()Ldev/kord/common/entity/optional/OptionalBoolean; + public final fun component11 ()Ldev/kord/common/entity/optional/Optional; + public final fun component12 ()Ldev/kord/common/entity/optional/Optional; public final fun component2 ()Ljava/lang/String; public final fun component3 ()Ldev/kord/common/entity/optional/Optional; public final fun component4 ()Ldev/kord/common/entity/optional/Optional; @@ -2431,11 +2452,12 @@ public final class dev/kord/common/entity/DiscordAttachment { public final fun component7 ()Ljava/lang/String; public final fun component8 ()Ldev/kord/common/entity/optional/OptionalInt; public final fun component9 ()Ldev/kord/common/entity/optional/OptionalInt; - public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;)Ldev/kord/common/entity/DiscordAttachment; - public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordAttachment;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordAttachment; + public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;)Ldev/kord/common/entity/DiscordAttachment; + public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordAttachment;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordAttachment; public fun equals (Ljava/lang/Object;)Z public final fun getContentType ()Ldev/kord/common/entity/optional/Optional; public final fun getDescription ()Ldev/kord/common/entity/optional/Optional; + public final fun getDurationSecs ()Ldev/kord/common/entity/optional/Optional; public final fun getEphemeral ()Ldev/kord/common/entity/optional/OptionalBoolean; public final fun getFilename ()Ljava/lang/String; public final fun getHeight ()Ldev/kord/common/entity/optional/OptionalInt; @@ -2443,10 +2465,11 @@ public final class dev/kord/common/entity/DiscordAttachment { public final fun getProxyUrl ()Ljava/lang/String; public final fun getSize ()I public final fun getUrl ()Ljava/lang/String; + public final fun getWaveform ()Ldev/kord/common/entity/optional/Optional; public final fun getWidth ()Ldev/kord/common/entity/optional/OptionalInt; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordAttachment;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordAttachment;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordAttachment$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2487,7 +2510,7 @@ public final class dev/kord/common/entity/DiscordAuditLog { public final fun getWebhooks ()Ljava/util/List; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordAuditLog;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordAuditLog;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordAuditLog$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2530,7 +2553,7 @@ public final class dev/kord/common/entity/DiscordAuditLogEntry { public final fun getUserId ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordAuditLogEntry;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordAuditLogEntry;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordAuditLogEntry$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2574,7 +2597,7 @@ public final class dev/kord/common/entity/DiscordAuditLogRoleChange { public final fun getPosition ()Ljava/lang/Integer; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordAuditLogRoleChange;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordAuditLogRoleChange;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordAuditLogRoleChange$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2603,7 +2626,7 @@ public final class dev/kord/common/entity/DiscordAutoComplete { public final fun getChoices ()Ljava/util/List; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordAutoComplete;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;Lkotlinx/serialization/KSerializer;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordAutoComplete;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;Lkotlinx/serialization/KSerializer;)V } public final class dev/kord/common/entity/DiscordAutoComplete$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2635,7 +2658,7 @@ public final class dev/kord/common/entity/DiscordAutoModerationAction { public final fun getType ()Ldev/kord/common/entity/AutoModerationActionType; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordAutoModerationAction;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordAutoModerationAction;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordAutoModerationAction$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2670,7 +2693,7 @@ public final class dev/kord/common/entity/DiscordAutoModerationActionMetadata { public final fun getDurationSeconds ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordAutoModerationActionMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordAutoModerationActionMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordAutoModerationActionMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2719,7 +2742,7 @@ public final class dev/kord/common/entity/DiscordAutoModerationRule { public final fun getTriggerType ()Ldev/kord/common/entity/AutoModerationRuleTriggerType; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordAutoModerationRule;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordAutoModerationRule;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordAutoModerationRule$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2740,25 +2763,27 @@ public final class dev/kord/common/entity/DiscordAutoModerationRule$Companion { public final class dev/kord/common/entity/DiscordAutoModerationRuleTriggerMetadata { public static final field Companion Ldev/kord/common/entity/DiscordAutoModerationRuleTriggerMetadata$Companion; public fun ()V - public synthetic fun (ILdev/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/OptionalInt;Lkotlinx/serialization/internal/SerializationConstructorMarker;)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/OptionalInt;)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/OptionalInt;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (ILdev/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/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;Lkotlinx/serialization/internal/SerializationConstructorMarker;)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/OptionalInt;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/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/kord/common/entity/optional/Optional; 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; public final fun component5 ()Ldev/kord/common/entity/optional/OptionalInt; - 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/OptionalInt;)Ldev/kord/common/entity/DiscordAutoModerationRuleTriggerMetadata; - public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordAutoModerationRuleTriggerMetadata;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/OptionalInt;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordAutoModerationRuleTriggerMetadata; + public final fun component6 ()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/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;)Ldev/kord/common/entity/DiscordAutoModerationRuleTriggerMetadata; + public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordAutoModerationRuleTriggerMetadata;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/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordAutoModerationRuleTriggerMetadata; public fun equals (Ljava/lang/Object;)Z public final fun getAllowList ()Ldev/kord/common/entity/optional/Optional; public final fun getKeywordFilter ()Ldev/kord/common/entity/optional/Optional; + public final fun getMentionRaidProtectionEnabled ()Ldev/kord/common/entity/optional/OptionalBoolean; public final fun getMentionTotalLimit ()Ldev/kord/common/entity/optional/OptionalInt; public final fun getPresets ()Ldev/kord/common/entity/optional/Optional; public final fun getRegexPatterns ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordAutoModerationRuleTriggerMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordAutoModerationRuleTriggerMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordAutoModerationRuleTriggerMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2792,7 +2817,7 @@ public final class dev/kord/common/entity/DiscordBotActivity { public final fun getUrl ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordBotActivity;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordBotActivity;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordBotActivity$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2890,7 +2915,7 @@ public final class dev/kord/common/entity/DiscordChannel { public final fun getVideoQualityMode ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordChannel;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordChannel;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordChannel$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2960,7 +2985,7 @@ public final class dev/kord/common/entity/DiscordChatComponent : dev/kord/common public fun getValue ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordChatComponent;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordChatComponent;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordChatComponent$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2995,7 +3020,7 @@ public final class dev/kord/common/entity/DiscordClientStatus { public final fun getWeb ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordClientStatus;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordClientStatus;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordClientStatus$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3065,7 +3090,7 @@ public final class dev/kord/common/entity/DiscordConnection { public final fun getVisibility ()Ldev/kord/common/entity/DiscordConnectionVisibility; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordConnection;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordConnection;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordConnection$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3122,7 +3147,7 @@ public final class dev/kord/common/entity/DiscordDeletedGuildRole { public final fun getId ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordDeletedGuildRole;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordDeletedGuildRole;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordDeletedGuildRole$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3177,7 +3202,7 @@ public final class dev/kord/common/entity/DiscordEmbed { public final fun getVideo ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordEmbed;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordEmbed;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordEmbed$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3210,7 +3235,7 @@ public final class dev/kord/common/entity/DiscordEmbed$Author { public final fun getUrl ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordEmbed$Author;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordEmbed$Author;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordEmbed$Author$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3248,7 +3273,7 @@ public final class dev/kord/common/entity/DiscordEmbed$Field { public final fun getValue ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordEmbed$Field;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordEmbed$Field;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordEmbed$Field$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3282,7 +3307,7 @@ public final class dev/kord/common/entity/DiscordEmbed$Footer { public final fun getText ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordEmbed$Footer;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordEmbed$Footer;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordEmbed$Footer$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3319,7 +3344,7 @@ public final class dev/kord/common/entity/DiscordEmbed$Image { public final fun getWidth ()Ldev/kord/common/entity/optional/OptionalInt; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordEmbed$Image;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordEmbed$Image;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordEmbed$Image$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3352,7 +3377,7 @@ public final class dev/kord/common/entity/DiscordEmbed$Provider { public final fun getUrl ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordEmbed$Provider;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordEmbed$Provider;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordEmbed$Provider$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3389,7 +3414,7 @@ public final class dev/kord/common/entity/DiscordEmbed$Thumbnail { public final fun getWidth ()Ldev/kord/common/entity/optional/OptionalInt; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordEmbed$Thumbnail;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordEmbed$Thumbnail;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordEmbed$Thumbnail$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3424,7 +3449,7 @@ public final class dev/kord/common/entity/DiscordEmbed$Video { public final fun getWidth ()Ldev/kord/common/entity/optional/OptionalInt; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordEmbed$Video;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordEmbed$Video;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordEmbed$Video$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3468,7 +3493,7 @@ public final class dev/kord/common/entity/DiscordEmoji { public final fun getUser ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordEmoji;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordEmoji;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordEmoji$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3488,9 +3513,9 @@ public final class dev/kord/common/entity/DiscordEmoji$Companion { public final class dev/kord/common/entity/DiscordGuild { public static final field Companion Ldev/kord/common/entity/DiscordGuild$Companion; - public synthetic fun (IILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;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/Snowflake;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Lkotlin/time/Duration;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/VerificationLevel;Ldev/kord/common/entity/DefaultMessageNotificationLevel;Ldev/kord/common/entity/ExplicitContentFilter;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/MFALevel;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/SystemChannelFlags;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalInt;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/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/PremiumTier;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/NsfwLevel;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLkotlinx/serialization/internal/SerializationConstructorMarker;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;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/Snowflake;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;JLdev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/VerificationLevel;Ldev/kord/common/entity/DefaultMessageNotificationLevel;Ldev/kord/common/entity/ExplicitContentFilter;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/MFALevel;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/SystemChannelFlags;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalInt;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/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/PremiumTier;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/NsfwLevel;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZIILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;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/Snowflake;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;JLdev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/VerificationLevel;Ldev/kord/common/entity/DefaultMessageNotificationLevel;Ldev/kord/common/entity/ExplicitContentFilter;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/MFALevel;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/SystemChannelFlags;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalInt;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/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/PremiumTier;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/NsfwLevel;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (IILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;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/Snowflake;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Lkotlin/time/Duration;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/VerificationLevel;Ldev/kord/common/entity/DefaultMessageNotificationLevel;Ldev/kord/common/entity/ExplicitContentFilter;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/MFALevel;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/SystemChannelFlags;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalInt;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/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/PremiumTier;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/NsfwLevel;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/Snowflake;Lkotlinx/serialization/internal/SerializationConstructorMarker;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;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/Snowflake;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;JLdev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/VerificationLevel;Ldev/kord/common/entity/DefaultMessageNotificationLevel;Ldev/kord/common/entity/ExplicitContentFilter;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/MFALevel;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/SystemChannelFlags;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalInt;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/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/PremiumTier;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/NsfwLevel;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/Snowflake;IILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;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/Snowflake;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;JLdev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/VerificationLevel;Ldev/kord/common/entity/DefaultMessageNotificationLevel;Ldev/kord/common/entity/ExplicitContentFilter;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/MFALevel;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/SystemChannelFlags;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalInt;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/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/PremiumTier;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/NsfwLevel;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/Snowflake;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/kord/common/entity/Snowflake; public final fun component10 ()Ljava/lang/String; public final fun component11 ()Ldev/kord/common/entity/Snowflake; @@ -3540,12 +3565,13 @@ public final class dev/kord/common/entity/DiscordGuild { public final fun component51 ()Ldev/kord/common/entity/optional/Optional; public final fun component52 ()Ldev/kord/common/entity/optional/Optional; public final fun component53 ()Z + public final fun component54 ()Ldev/kord/common/entity/Snowflake; 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/Snowflake; public final fun component9 ()Ldev/kord/common/entity/optional/Optional; - public final fun copy-0G5xgaY (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;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/Snowflake;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;JLdev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/VerificationLevel;Ldev/kord/common/entity/DefaultMessageNotificationLevel;Ldev/kord/common/entity/ExplicitContentFilter;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/MFALevel;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/SystemChannelFlags;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalInt;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/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/PremiumTier;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/NsfwLevel;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Z)Ldev/kord/common/entity/DiscordGuild; - public static synthetic fun copy-0G5xgaY$default (Ldev/kord/common/entity/DiscordGuild;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;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/Snowflake;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;JLdev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/VerificationLevel;Ldev/kord/common/entity/DefaultMessageNotificationLevel;Ldev/kord/common/entity/ExplicitContentFilter;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/MFALevel;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/SystemChannelFlags;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalInt;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/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/PremiumTier;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/NsfwLevel;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZIILjava/lang/Object;)Ldev/kord/common/entity/DiscordGuild; + public final fun copy-S_VAx1s (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;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/Snowflake;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;JLdev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/VerificationLevel;Ldev/kord/common/entity/DefaultMessageNotificationLevel;Ldev/kord/common/entity/ExplicitContentFilter;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/MFALevel;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/SystemChannelFlags;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalInt;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/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/PremiumTier;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/NsfwLevel;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/Snowflake;)Ldev/kord/common/entity/DiscordGuild; + public static synthetic fun copy-S_VAx1s$default (Ldev/kord/common/entity/DiscordGuild;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;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/Snowflake;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;JLdev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/VerificationLevel;Ldev/kord/common/entity/DefaultMessageNotificationLevel;Ldev/kord/common/entity/ExplicitContentFilter;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/MFALevel;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/SystemChannelFlags;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalInt;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/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/PremiumTier;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/NsfwLevel;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/Snowflake;IILjava/lang/Object;)Ldev/kord/common/entity/DiscordGuild; public fun equals (Ljava/lang/Object;)Z public final fun getAfkChannelId ()Ldev/kord/common/entity/Snowflake; public final fun getAfkTimeout-UwyO8pc ()J @@ -3587,6 +3613,7 @@ public final class dev/kord/common/entity/DiscordGuild { public final fun getRegion ()Ljava/lang/String; public final fun getRoles ()Ljava/util/List; public final fun getRulesChannelId ()Ldev/kord/common/entity/Snowflake; + public final fun getSafetyAlertsChannelId ()Ldev/kord/common/entity/Snowflake; public final fun getSplash ()Ldev/kord/common/entity/optional/Optional; public final fun getStageInstances ()Ldev/kord/common/entity/optional/Optional; public final fun getStickers ()Ldev/kord/common/entity/optional/Optional; @@ -3602,7 +3629,7 @@ public final class dev/kord/common/entity/DiscordGuild { public final fun getWidgetEnabled ()Ldev/kord/common/entity/optional/OptionalBoolean; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordGuild;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordGuild;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordGuild$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3635,7 +3662,7 @@ public final class dev/kord/common/entity/DiscordGuildApplicationCommandPermissi public final fun getType ()Ldev/kord/common/entity/ApplicationCommandPermissionType; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordGuildApplicationCommandPermission;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordGuildApplicationCommandPermission;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordGuildApplicationCommandPermission$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3670,7 +3697,7 @@ public final class dev/kord/common/entity/DiscordGuildApplicationCommandPermissi public final fun getPermissions ()Ljava/util/List; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordGuildApplicationCommandPermissions;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordGuildApplicationCommandPermissions;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordGuildApplicationCommandPermissions$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3701,7 +3728,7 @@ public final class dev/kord/common/entity/DiscordGuildBan { public final fun getUser ()Ldev/kord/common/entity/DiscordUser; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordGuildBan;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordGuildBan;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordGuildBan$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3730,7 +3757,7 @@ public final class dev/kord/common/entity/DiscordGuildIntegrations { public final fun getGuildId ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordGuildIntegrations;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordGuildIntegrations;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordGuildIntegrations$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3780,7 +3807,7 @@ public final class dev/kord/common/entity/DiscordGuildMember { public final fun getUser ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordGuildMember;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordGuildMember;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordGuildMember$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3815,7 +3842,7 @@ public final class dev/kord/common/entity/DiscordGuildOnboarding { public final fun getPrompts ()Ljava/util/List; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordGuildOnboarding;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordGuildOnboarding;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordGuildOnboarding$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3864,7 +3891,7 @@ public final class dev/kord/common/entity/DiscordGuildPreview { public final fun getStickers ()Ljava/util/List; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordGuildPreview;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordGuildPreview;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordGuildPreview$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3895,7 +3922,7 @@ public final class dev/kord/common/entity/DiscordGuildRole { public final fun getRole ()Ldev/kord/common/entity/DiscordRole; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordGuildRole;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordGuildRole;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordGuildRole$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3955,7 +3982,7 @@ public final class dev/kord/common/entity/DiscordGuildScheduledEvent { public final fun getUserCount ()Ldev/kord/common/entity/optional/OptionalInt; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordGuildScheduledEvent;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordGuildScheduledEvent;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordGuildScheduledEvent$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3986,7 +4013,7 @@ public final class dev/kord/common/entity/DiscordGuildWidget { public final fun getEnabled ()Z public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordGuildWidget;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordGuildWidget;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordGuildWidget$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4046,7 +4073,7 @@ public final class dev/kord/common/entity/DiscordIntegration { public final fun getUser ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordIntegration;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordIntegration;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordIntegration$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4077,7 +4104,7 @@ public final class dev/kord/common/entity/DiscordIntegrationAccount { public final fun getName ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordIntegrationAccount;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordIntegrationAccount;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordIntegrationAccount$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4111,7 +4138,7 @@ public final class dev/kord/common/entity/DiscordIntegrationDelete { public final fun getId ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordIntegrationDelete;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordIntegrationDelete;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordIntegrationDelete$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4142,7 +4169,7 @@ public final class dev/kord/common/entity/DiscordIntegrationsAccount { public final fun getName ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordIntegrationsAccount;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordIntegrationsAccount;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordIntegrationsAccount$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4198,7 +4225,7 @@ public final class dev/kord/common/entity/DiscordInteraction { public final fun getVersion ()I public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordInteraction;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordInteraction;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordInteraction$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4244,7 +4271,7 @@ public final class dev/kord/common/entity/DiscordInteractionGuildMember { public final fun getUser ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordInteractionGuildMember;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordInteractionGuildMember;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordInteractionGuildMember$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4296,7 +4323,7 @@ public final class dev/kord/common/entity/DiscordInvite : dev/kord/common/entity public fun getTargetUser ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordInvite;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordInvite;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordInvite$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4356,7 +4383,7 @@ public final class dev/kord/common/entity/DiscordInviteWithMetadata : dev/kord/c public final fun getUses ()I public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordInviteWithMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordInviteWithMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordInviteWithMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4391,7 +4418,7 @@ public final class dev/kord/common/entity/DiscordMentionedChannel { public final fun getType ()Ldev/kord/common/entity/ChannelType; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordMentionedChannel;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordMentionedChannel;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordMentionedChannel$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4483,7 +4510,7 @@ public final class dev/kord/common/entity/DiscordMessage { public final fun getWebhookId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordMessage;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordMessage;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordMessage$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4518,7 +4545,7 @@ public final class dev/kord/common/entity/DiscordMessageInteraction { public final fun getUser ()Ldev/kord/common/entity/DiscordUser; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordMessageInteraction;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordMessageInteraction;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordMessageInteraction$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4563,7 +4590,7 @@ public final class dev/kord/common/entity/DiscordMessageReference { public final fun getId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordMessageReference;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordMessageReference;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordMessageReference$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4611,7 +4638,7 @@ public final class dev/kord/common/entity/DiscordMessageSticker { public final fun getUser ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordMessageSticker;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordMessageSticker;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordMessageSticker$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4644,7 +4671,7 @@ public final class dev/kord/common/entity/DiscordModal { public final fun getTitle ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordModal;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordModal;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordModal$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4662,14 +4689,6 @@ public final class dev/kord/common/entity/DiscordModal$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } -public final class dev/kord/common/entity/DiscordNull { - public static final field Companion Ldev/kord/common/entity/DiscordNull$Companion; -} - -public final class dev/kord/common/entity/DiscordNull$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - public final class dev/kord/common/entity/DiscordOnboardingPrompt { public static final field Companion Ldev/kord/common/entity/DiscordOnboardingPrompt$Companion; public synthetic fun (ILdev/kord/common/entity/Snowflake;Ldev/kord/common/entity/OnboardingPromptType;Ljava/util/List;Ljava/lang/String;ZZZLkotlinx/serialization/internal/SerializationConstructorMarker;)V @@ -4693,7 +4712,7 @@ public final class dev/kord/common/entity/DiscordOnboardingPrompt { public final fun getType ()Ldev/kord/common/entity/OnboardingPromptType; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordOnboardingPrompt;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordOnboardingPrompt;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordOnboardingPrompt$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4732,7 +4751,7 @@ public final class dev/kord/common/entity/DiscordOnboardingPromptOption { public final fun getTitle ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordOnboardingPromptOption;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordOnboardingPromptOption;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordOnboardingPromptOption$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4752,31 +4771,33 @@ public final class dev/kord/common/entity/DiscordOnboardingPromptOption$Companio public final class dev/kord/common/entity/DiscordOptionallyMemberUser { public static final field Companion Ldev/kord/common/entity/DiscordOptionallyMemberUser$Companion; - public synthetic fun (ILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;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;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;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;)V - public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;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;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (ILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;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;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;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;)V + public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;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;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/kord/common/entity/Snowflake; - public final fun component10 ()Ldev/kord/common/entity/optional/Optional; + public final fun component10 ()Ldev/kord/common/entity/optional/OptionalBoolean; public final fun component11 ()Ldev/kord/common/entity/optional/Optional; public final fun component12 ()Ldev/kord/common/entity/optional/Optional; public final fun component13 ()Ldev/kord/common/entity/optional/Optional; public final fun component14 ()Ldev/kord/common/entity/optional/Optional; + public final fun component15 ()Ldev/kord/common/entity/optional/Optional; public final fun component2 ()Ljava/lang/String; - public final fun component3 ()Ljava/lang/String; - public final fun component4 ()Ljava/lang/String; - public final fun component5 ()Ldev/kord/common/entity/optional/OptionalBoolean; + public final fun component3 ()Ldev/kord/common/entity/optional/Optional; + public final fun component4 ()Ldev/kord/common/entity/optional/Optional; + public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ldev/kord/common/entity/optional/OptionalBoolean; public final fun component7 ()Ldev/kord/common/entity/optional/OptionalBoolean; - public final fun component8 ()Ldev/kord/common/entity/optional/Optional; - public final fun component9 ()Ldev/kord/common/entity/optional/OptionalBoolean; - public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;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/DiscordOptionallyMemberUser; - public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordOptionallyMemberUser;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;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;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordOptionallyMemberUser; + public final fun component8 ()Ldev/kord/common/entity/optional/OptionalBoolean; + public final fun component9 ()Ldev/kord/common/entity/optional/Optional; + public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;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/DiscordOptionallyMemberUser; + public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordOptionallyMemberUser;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;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;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordOptionallyMemberUser; public fun equals (Ljava/lang/Object;)Z public final fun getAvatar ()Ljava/lang/String; public final fun getBot ()Ldev/kord/common/entity/optional/OptionalBoolean; - public final fun getDiscriminator ()Ljava/lang/String; + public final fun getDiscriminator ()Ldev/kord/common/entity/optional/Optional; public final fun getEmail ()Ldev/kord/common/entity/optional/Optional; public final fun getFlags ()Ldev/kord/common/entity/optional/Optional; + public final fun getGlobalName ()Ldev/kord/common/entity/optional/Optional; public final fun getId ()Ldev/kord/common/entity/Snowflake; public final fun getLocale ()Ldev/kord/common/entity/optional/Optional; public final fun getMember ()Ldev/kord/common/entity/optional/Optional; @@ -4788,7 +4809,7 @@ public final class dev/kord/common/entity/DiscordOptionallyMemberUser { public final fun getVerified ()Ldev/kord/common/entity/optional/OptionalBoolean; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordOptionallyMemberUser;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordOptionallyMemberUser;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordOptionallyMemberUser$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4808,9 +4829,9 @@ public final class dev/kord/common/entity/DiscordOptionallyMemberUser$Companion public final class dev/kord/common/entity/DiscordPartialApplication : dev/kord/common/entity/BaseDiscordApplication { public static final field Companion Ldev/kord/common/entity/DiscordPartialApplication$Companion; - public synthetic fun (ILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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;)V - public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (ILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/Optional;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/Optional;)V + public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/Optional;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/kord/common/entity/Snowflake; public final fun component10 ()Ldev/kord/common/entity/optional/OptionalSnowflake; public final fun component11 ()Ldev/kord/common/entity/optional/OptionalSnowflake; @@ -4820,6 +4841,7 @@ public final class dev/kord/common/entity/DiscordPartialApplication : dev/kord/c public final fun component15 ()Ldev/kord/common/entity/optional/Optional; public final fun component16 ()Ldev/kord/common/entity/optional/Optional; public final fun component17 ()Ldev/kord/common/entity/optional/Optional; + public final fun component18 ()Ldev/kord/common/entity/optional/Optional; public final fun component2 ()Ljava/lang/String; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ljava/lang/String; @@ -4828,8 +4850,8 @@ public final class dev/kord/common/entity/DiscordPartialApplication : dev/kord/c public final fun component7 ()Ldev/kord/common/entity/optional/Optional; public final fun component8 ()Ldev/kord/common/entity/optional/Optional; public final fun component9 ()Ljava/lang/String; - public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/DiscordPartialApplication; - public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordPartialApplication;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordPartialApplication; + public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/Optional;)Ldev/kord/common/entity/DiscordPartialApplication; + public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordPartialApplication;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/Optional;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordPartialApplication; public fun equals (Ljava/lang/Object;)Z public fun getCoverImage ()Ldev/kord/common/entity/optional/Optional; public fun getCustomInstallUrl ()Ldev/kord/common/entity/optional/Optional; @@ -4843,6 +4865,7 @@ public final class dev/kord/common/entity/DiscordPartialApplication : dev/kord/c public fun getOwner ()Ldev/kord/common/entity/optional/Optional; public fun getPrimarySkuId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public fun getPrivacyPolicyUrl ()Ldev/kord/common/entity/optional/Optional; + public fun getRoleConnectionsVerificationUrl ()Ldev/kord/common/entity/optional/Optional; public fun getRpcOrigins ()Ldev/kord/common/entity/optional/Optional; public fun getSlug ()Ldev/kord/common/entity/optional/Optional; public fun getTags ()Ldev/kord/common/entity/optional/Optional; @@ -4850,7 +4873,7 @@ public final class dev/kord/common/entity/DiscordPartialApplication : dev/kord/c public fun getVerifyKey ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordPartialApplication;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordPartialApplication;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordPartialApplication$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4885,7 +4908,7 @@ public final class dev/kord/common/entity/DiscordPartialEmoji { public final fun getName ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordPartialEmoji;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordPartialEmoji;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordPartialEmoji$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4947,7 +4970,7 @@ public final class dev/kord/common/entity/DiscordPartialGuild { public final fun getWelcomeScreen ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordPartialGuild;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordPartialGuild;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordPartialGuild$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4982,7 +5005,7 @@ public final class dev/kord/common/entity/DiscordPartialIntegration { public final fun getType ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordPartialIntegration;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordPartialIntegration;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordPartialIntegration$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5013,7 +5036,7 @@ public final class dev/kord/common/entity/DiscordPartialInvite { public final fun getUses ()I public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordPartialInvite;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordPartialInvite;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordPartialInvite$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5097,7 +5120,7 @@ public final class dev/kord/common/entity/DiscordPartialMessage { public final fun getWebhookId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordPartialMessage;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordPartialMessage;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordPartialMessage$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5147,7 +5170,7 @@ public final class dev/kord/common/entity/DiscordPartialRole { public final fun getUnicodeEmoji ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordPartialRole;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordPartialRole;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordPartialRole$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5181,7 +5204,7 @@ public final class dev/kord/common/entity/DiscordPinsUpdateData { public final fun getLastPinTimestamp ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordPinsUpdateData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordPinsUpdateData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordPinsUpdateData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5219,7 +5242,7 @@ public final class dev/kord/common/entity/DiscordPresenceUpdate { public final fun getUser ()Ldev/kord/common/entity/DiscordPresenceUser; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordPresenceUpdate;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordPresenceUpdate;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordPresenceUpdate$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5268,7 +5291,7 @@ public final class dev/kord/common/entity/DiscordRemovedGuildMember { public final fun getUser ()Ldev/kord/common/entity/DiscordUser; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordRemovedGuildMember;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordRemovedGuildMember;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordRemovedGuildMember$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5318,7 +5341,7 @@ public final class dev/kord/common/entity/DiscordRole { public final fun getUnicodeEmoji ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordRole;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordRole;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordRole$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5359,7 +5382,7 @@ public final class dev/kord/common/entity/DiscordRoleTags { public final fun getSubscriptionListingId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordRoleTags;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordRoleTags;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordRoleTags$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5397,7 +5420,7 @@ public final class dev/kord/common/entity/DiscordSelectOption { public final fun getValue ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordSelectOption;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordSelectOption;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordSelectOption$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5461,7 +5484,7 @@ public final class dev/kord/common/entity/DiscordStageInstance { public final fun getTopic ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordStageInstance;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordStageInstance;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordStageInstance$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5494,7 +5517,7 @@ public final class dev/kord/common/entity/DiscordStickerItem { public final fun getName ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordStickerItem;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordStickerItem;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordStickerItem$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5536,7 +5559,7 @@ public final class dev/kord/common/entity/DiscordStickerPack { public final fun getStickers ()Ljava/util/List; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordStickerPack;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordStickerPack;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordStickerPack$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5571,7 +5594,7 @@ public final class dev/kord/common/entity/DiscordTeam { public final fun getOwnerUserId ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordTeam;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordTeam;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordTeam$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5606,7 +5629,7 @@ public final class dev/kord/common/entity/DiscordTeamMember { public final fun getUser ()Ldev/kord/common/entity/DiscordUser; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordTeamMember;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordTeamMember;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordTeamMember$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5655,7 +5678,7 @@ public final class dev/kord/common/entity/DiscordTemplate { public fun hashCode ()I public final fun isDirty ()Ljava/lang/Boolean; public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordTemplate;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordTemplate;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordTemplate$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5717,7 +5740,7 @@ public final class dev/kord/common/entity/DiscordTextInputComponent : dev/kord/c public fun getValue ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordTextInputComponent;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordTextInputComponent;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordTextInputComponent$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5753,7 +5776,7 @@ public final class dev/kord/common/entity/DiscordThreadMember { public final fun getUserId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordThreadMember;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordThreadMember;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordThreadMember$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5793,7 +5816,7 @@ public final class dev/kord/common/entity/DiscordThreadMetadata { public final fun getLocked ()Ldev/kord/common/entity/optional/OptionalBoolean; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordThreadMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordThreadMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordThreadMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5831,7 +5854,7 @@ public final class dev/kord/common/entity/DiscordTyping { public final fun getUserId ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordTyping;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordTyping;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordTyping$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5863,7 +5886,7 @@ public final class dev/kord/common/entity/DiscordUnavailableGuild { public final fun getUnavailable ()Ldev/kord/common/entity/optional/OptionalBoolean; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordUnavailableGuild;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordUnavailableGuild;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordUnavailableGuild$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5894,7 +5917,7 @@ public final class dev/kord/common/entity/DiscordUpdatedEmojis { public final fun getGuildId ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordUpdatedEmojis;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordUpdatedEmojis;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordUpdatedEmojis$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5940,7 +5963,7 @@ public final class dev/kord/common/entity/DiscordUpdatedGuildMember { public final fun getUser ()Ldev/kord/common/entity/DiscordUser; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordUpdatedGuildMember;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordUpdatedGuildMember;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordUpdatedGuildMember$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5960,34 +5983,36 @@ public final class dev/kord/common/entity/DiscordUpdatedGuildMember$Companion { public final class dev/kord/common/entity/DiscordUser { public static final field Companion Ldev/kord/common/entity/DiscordUser$Companion; - public synthetic fun (ILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ljava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ljava/lang/Integer;)V - public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (ILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ljava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ljava/lang/Integer;)V + public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/kord/common/entity/Snowflake; - public final fun component10 ()Ldev/kord/common/entity/optional/Optional; + public final fun component10 ()Ldev/kord/common/entity/optional/OptionalBoolean; public final fun component11 ()Ldev/kord/common/entity/optional/Optional; public final fun component12 ()Ldev/kord/common/entity/optional/Optional; public final fun component13 ()Ldev/kord/common/entity/optional/Optional; - public final fun component14 ()Ljava/lang/String; - public final fun component15 ()Ljava/lang/Integer; + public final fun component14 ()Ldev/kord/common/entity/optional/Optional; + public final fun component15 ()Ljava/lang/String; + public final fun component16 ()Ljava/lang/Integer; public final fun component2 ()Ljava/lang/String; - public final fun component3 ()Ljava/lang/String; - public final fun component4 ()Ljava/lang/String; - public final fun component5 ()Ldev/kord/common/entity/optional/OptionalBoolean; + public final fun component3 ()Ldev/kord/common/entity/optional/Optional; + public final fun component4 ()Ldev/kord/common/entity/optional/Optional; + public final fun component5 ()Ljava/lang/String; public final fun component6 ()Ldev/kord/common/entity/optional/OptionalBoolean; public final fun component7 ()Ldev/kord/common/entity/optional/OptionalBoolean; - public final fun component8 ()Ldev/kord/common/entity/optional/Optional; - public final fun component9 ()Ldev/kord/common/entity/optional/OptionalBoolean; - public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ljava/lang/Integer;)Ldev/kord/common/entity/DiscordUser; - public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordUser;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordUser; + public final fun component8 ()Ldev/kord/common/entity/optional/OptionalBoolean; + public final fun component9 ()Ldev/kord/common/entity/optional/Optional; + public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ljava/lang/Integer;)Ldev/kord/common/entity/DiscordUser; + public static synthetic fun copy$default (Ldev/kord/common/entity/DiscordUser;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Ldev/kord/common/entity/DiscordUser; public fun equals (Ljava/lang/Object;)Z public final fun getAccentColor ()Ljava/lang/Integer; public final fun getAvatar ()Ljava/lang/String; public final fun getBanner ()Ljava/lang/String; public final fun getBot ()Ldev/kord/common/entity/optional/OptionalBoolean; - public final fun getDiscriminator ()Ljava/lang/String; + public final fun getDiscriminator ()Ldev/kord/common/entity/optional/Optional; public final fun getEmail ()Ldev/kord/common/entity/optional/Optional; public final fun getFlags ()Ldev/kord/common/entity/optional/Optional; + public final fun getGlobalName ()Ldev/kord/common/entity/optional/Optional; public final fun getId ()Ldev/kord/common/entity/Snowflake; public final fun getLocale ()Ldev/kord/common/entity/optional/Optional; public final fun getMfaEnabled ()Ldev/kord/common/entity/optional/OptionalBoolean; @@ -5998,7 +6023,7 @@ public final class dev/kord/common/entity/DiscordUser { public final fun getVerified ()Ldev/kord/common/entity/optional/OptionalBoolean; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordUser;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordUser;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordUser$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -6039,7 +6064,7 @@ public final class dev/kord/common/entity/DiscordVoiceRegion { public final fun getOptimal ()Z public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordVoiceRegion;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordVoiceRegion;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordVoiceRegion$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -6072,7 +6097,7 @@ public final class dev/kord/common/entity/DiscordVoiceServerUpdateData { public final fun getToken ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordVoiceServerUpdateData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordVoiceServerUpdateData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordVoiceServerUpdateData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -6126,7 +6151,7 @@ public final class dev/kord/common/entity/DiscordVoiceState { public final fun getUserId ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordVoiceState;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordVoiceState;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordVoiceState$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -6172,7 +6197,7 @@ public final class dev/kord/common/entity/DiscordWebhook { public final fun getUser ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordWebhook;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordWebhook;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordWebhook$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -6203,7 +6228,7 @@ public final class dev/kord/common/entity/DiscordWebhooksUpdateData { public final fun getGuildId ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordWebhooksUpdateData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordWebhooksUpdateData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordWebhooksUpdateData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -6234,7 +6259,7 @@ public final class dev/kord/common/entity/DiscordWelcomeScreen { public final fun getWelcomeChannels ()Ljava/util/List; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordWelcomeScreen;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordWelcomeScreen;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordWelcomeScreen$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -6269,7 +6294,7 @@ public final class dev/kord/common/entity/DiscordWelcomeScreenChannel { public final fun getEmojiName ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/DiscordWelcomeScreenChannel;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/DiscordWelcomeScreenChannel;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/DiscordWelcomeScreenChannel$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -6408,7 +6433,7 @@ public final class dev/kord/common/entity/ForumTag { public final fun getName ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/ForumTag;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/ForumTag;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/ForumTag$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -6496,10 +6521,6 @@ public final class dev/kord/common/entity/GuildFeature$MemberVerificationGateEna public static final field INSTANCE Ldev/kord/common/entity/GuildFeature$MemberVerificationGateEnabled; } -public final class dev/kord/common/entity/GuildFeature$MonetizationEnabled : dev/kord/common/entity/GuildFeature { - public static final field INSTANCE Ldev/kord/common/entity/GuildFeature$MonetizationEnabled; -} - public final class dev/kord/common/entity/GuildFeature$MoreStickers : dev/kord/common/entity/GuildFeature { public static final field INSTANCE Ldev/kord/common/entity/GuildFeature$MoreStickers; } @@ -6516,8 +6537,8 @@ public final class dev/kord/common/entity/GuildFeature$PreviewEnabled : dev/kord public static final field INSTANCE Ldev/kord/common/entity/GuildFeature$PreviewEnabled; } -public final class dev/kord/common/entity/GuildFeature$PrivateThreads : dev/kord/common/entity/GuildFeature { - public static final field INSTANCE Ldev/kord/common/entity/GuildFeature$PrivateThreads; +public final class dev/kord/common/entity/GuildFeature$RaidAlertsDisabled : dev/kord/common/entity/GuildFeature { + public static final field INSTANCE Ldev/kord/common/entity/GuildFeature$RaidAlertsDisabled; } public final class dev/kord/common/entity/GuildFeature$RoleIcons : dev/kord/common/entity/GuildFeature { @@ -6563,6 +6584,7 @@ public final class dev/kord/common/entity/GuildMemberFlag : java/lang/Enum { public static final field DidRejoin Ldev/kord/common/entity/GuildMemberFlag; public static final field StartedOnboarding Ldev/kord/common/entity/GuildMemberFlag; public final fun getCode ()I + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Ldev/kord/common/entity/GuildMemberFlag; public static fun values ()[Ldev/kord/common/entity/GuildMemberFlag; } @@ -6601,7 +6623,7 @@ public final class dev/kord/common/entity/GuildScheduledEventEntityMetadata { public final fun getLocation ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/GuildScheduledEventEntityMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/GuildScheduledEventEntityMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/GuildScheduledEventEntityMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -6643,7 +6665,6 @@ public final class dev/kord/common/entity/GuildScheduledEventPrivacyLevel$Unknow public abstract class dev/kord/common/entity/GuildScheduledEventStatus { public static final field Companion Ldev/kord/common/entity/GuildScheduledEventStatus$Companion; - public static final field Serializer Ldev/kord/common/entity/GuildScheduledEventStatus$Serializer; public synthetic fun (ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun equals (Ljava/lang/Object;)Z public final fun getValue ()I @@ -6672,16 +6693,6 @@ public final class dev/kord/common/entity/GuildScheduledEventStatus$Scheduled : public static final field INSTANCE Ldev/kord/common/entity/GuildScheduledEventStatus$Scheduled; } -public final class dev/kord/common/entity/GuildScheduledEventStatus$Serializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Ldev/kord/common/entity/GuildScheduledEventStatus$Serializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/kord/common/entity/GuildScheduledEventStatus; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/kord/common/entity/GuildScheduledEventStatus;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public final synthetic fun serializer ()Lkotlinx/serialization/KSerializer; -} - public final class dev/kord/common/entity/GuildScheduledEventStatus$Unknown : dev/kord/common/entity/GuildScheduledEventStatus { public fun (I)V } @@ -6699,7 +6710,7 @@ public final class dev/kord/common/entity/InstallParams { public final fun getScopes ()Ljava/util/List; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/InstallParams;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/InstallParams;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/InstallParams$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -6737,7 +6748,7 @@ public final class dev/kord/common/entity/IntegrationApplication { public final fun getName ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/IntegrationApplication;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/IntegrationApplication;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/IntegrationApplication$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -6757,7 +6768,6 @@ public final class dev/kord/common/entity/IntegrationApplication$Companion { public abstract class dev/kord/common/entity/IntegrationExpireBehavior { public static final field Companion Ldev/kord/common/entity/IntegrationExpireBehavior$Companion; - public static final field Serializer Ldev/kord/common/entity/IntegrationExpireBehavior$Serializer; public synthetic fun (ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun equals (Ljava/lang/Object;)Z public final fun getValue ()I @@ -6778,16 +6788,6 @@ public final class dev/kord/common/entity/IntegrationExpireBehavior$RemoveRole : public static final field INSTANCE Ldev/kord/common/entity/IntegrationExpireBehavior$RemoveRole; } -public final class dev/kord/common/entity/IntegrationExpireBehavior$Serializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Ldev/kord/common/entity/IntegrationExpireBehavior$Serializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/kord/common/entity/IntegrationExpireBehavior; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/kord/common/entity/IntegrationExpireBehavior;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public final synthetic fun serializer ()Lkotlinx/serialization/KSerializer; -} - public final class dev/kord/common/entity/IntegrationExpireBehavior$Unknown : dev/kord/common/entity/IntegrationExpireBehavior { public fun (I)V } @@ -6825,7 +6825,7 @@ public final class dev/kord/common/entity/InteractionCallbackData { public final fun getValues ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/InteractionCallbackData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/InteractionCallbackData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/InteractionCallbackData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -6927,13 +6927,6 @@ public final class dev/kord/common/entity/InteractionType$Unknown : dev/kord/com public fun (I)V } -public final class dev/kord/common/entity/InteractionsKt { - public static final fun boolean (Ldev/kord/common/entity/CommandArgument;)Z - public static final fun int (Ldev/kord/common/entity/CommandArgument;)J - public static final fun snowflake (Ldev/kord/common/entity/CommandArgument;)Ldev/kord/common/entity/Snowflake; - public static final fun string (Ldev/kord/common/entity/CommandArgument;)Ljava/lang/String; -} - public abstract class dev/kord/common/entity/InviteTargetType { public static final field Companion Ldev/kord/common/entity/InviteTargetType$Companion; public synthetic fun (ILkotlin/jvm/internal/DefaultConstructorMarker;)V @@ -7000,7 +6993,7 @@ public final class dev/kord/common/entity/MessageActivity { public final fun getType ()Ldev/kord/common/entity/MessageActivityType; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/MessageActivity;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/MessageActivity;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/MessageActivity$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -7072,7 +7065,7 @@ public final class dev/kord/common/entity/MessageApplication { public final fun getName ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/MessageApplication;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/MessageApplication;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/MessageApplication$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -7096,12 +7089,14 @@ public final class dev/kord/common/entity/MessageFlag : java/lang/Enum { public static final field FailedToMentionSomeRolesInThread Ldev/kord/common/entity/MessageFlag; public static final field HasThread Ldev/kord/common/entity/MessageFlag; public static final field IsCrossPost Ldev/kord/common/entity/MessageFlag; + public static final field IsVoiceMessage Ldev/kord/common/entity/MessageFlag; public static final field Loading Ldev/kord/common/entity/MessageFlag; public static final field SourceMessageDeleted Ldev/kord/common/entity/MessageFlag; public static final field SuppressEmbeds Ldev/kord/common/entity/MessageFlag; public static final field SuppressNotifications Ldev/kord/common/entity/MessageFlag; public static final field Urgent Ldev/kord/common/entity/MessageFlag; public final fun getCode ()I + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Ldev/kord/common/entity/MessageFlag; public static fun values ()[Ldev/kord/common/entity/MessageFlag; } @@ -7162,7 +7157,7 @@ public final class dev/kord/common/entity/MessageReactionAddData { public final fun getUserId ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/MessageReactionAddData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/MessageReactionAddData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/MessageReactionAddData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -7200,7 +7195,7 @@ public final class dev/kord/common/entity/MessageReactionRemoveData { public final fun getUserId ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/MessageReactionRemoveData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/MessageReactionRemoveData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/MessageReactionRemoveData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -7233,7 +7228,6 @@ public final class dev/kord/common/entity/MessageStickerType$APNG : dev/kord/com public final class dev/kord/common/entity/MessageStickerType$Companion { public final fun getEntries ()Ljava/util/List; - public final synthetic fun getValues ()Ljava/util/Set; public final fun serializer ()Lkotlinx/serialization/KSerializer; } @@ -7292,7 +7286,6 @@ public final class dev/kord/common/entity/MessageType$ChatInputCommand : dev/kor public final class dev/kord/common/entity/MessageType$Companion { public final fun getEntries ()Ljava/util/List; - public final synthetic fun getValues ()Ljava/util/Set; public final fun serializer ()Lkotlinx/serialization/KSerializer; } @@ -7492,7 +7485,7 @@ public final class dev/kord/common/entity/Overwrite { public final fun getType ()Ldev/kord/common/entity/OverwriteType; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/Overwrite;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/Overwrite;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/Overwrite$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -7679,6 +7672,10 @@ public final class dev/kord/common/entity/Permission$SendTTSMessages : dev/kord/ public static final field INSTANCE Ldev/kord/common/entity/Permission$SendTTSMessages; } +public final class dev/kord/common/entity/Permission$SendVoiceMessages : dev/kord/common/entity/Permission { + public static final field INSTANCE Ldev/kord/common/entity/Permission$SendVoiceMessages; +} + public final class dev/kord/common/entity/Permission$Speak : dev/kord/common/entity/Permission { public static final field INSTANCE Ldev/kord/common/entity/Permission$Speak; } @@ -7704,6 +7701,10 @@ public final class dev/kord/common/entity/Permission$UseExternalEmojis : dev/kor public static final field INSTANCE Ldev/kord/common/entity/Permission$UseExternalEmojis; } +public final class dev/kord/common/entity/Permission$UseExternalSounds : dev/kord/common/entity/Permission { + public static final field INSTANCE Ldev/kord/common/entity/Permission$UseExternalSounds; +} + public final class dev/kord/common/entity/Permission$UseExternalStickers : dev/kord/common/entity/Permission { public static final field INSTANCE Ldev/kord/common/entity/Permission$UseExternalStickers; } @@ -7816,7 +7817,6 @@ public final class dev/kord/common/entity/PremiumTier$Unknown : dev/kord/common/ public abstract class dev/kord/common/entity/PresenceStatus { public static final field Companion Ldev/kord/common/entity/PresenceStatus$Companion; - public static final field StatusSerializer Ldev/kord/common/entity/PresenceStatus$StatusSerializer; public synthetic fun (Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun equals (Ljava/lang/Object;)Z public final fun getValue ()Ljava/lang/String; @@ -7849,16 +7849,6 @@ public final class dev/kord/common/entity/PresenceStatus$Online : dev/kord/commo public static final field INSTANCE Ldev/kord/common/entity/PresenceStatus$Online; } -public final class dev/kord/common/entity/PresenceStatus$StatusSerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Ldev/kord/common/entity/PresenceStatus$StatusSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/kord/common/entity/PresenceStatus; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/kord/common/entity/PresenceStatus;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public final synthetic fun serializer ()Lkotlinx/serialization/KSerializer; -} - public final class dev/kord/common/entity/PresenceStatus$Unknown : dev/kord/common/entity/PresenceStatus { public fun (Ljava/lang/String;)V } @@ -7878,7 +7868,7 @@ public final class dev/kord/common/entity/Reaction { public final fun getMe ()Z public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/Reaction;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/Reaction;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/Reaction$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -7919,7 +7909,7 @@ public final class dev/kord/common/entity/ResolvedObjects { public final fun getUsers ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/ResolvedObjects;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/ResolvedObjects;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/ResolvedObjects$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -7954,7 +7944,7 @@ public final class dev/kord/common/entity/RoleSubscription { public fun hashCode ()I public final fun isRenewal ()Z public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/RoleSubscription;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/RoleSubscription;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/RoleSubscription$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -7974,7 +7964,6 @@ public final class dev/kord/common/entity/RoleSubscription$Companion { public abstract class dev/kord/common/entity/ScheduledEntityType { public static final field Companion Ldev/kord/common/entity/ScheduledEntityType$Companion; - public static final field Serializer Ldev/kord/common/entity/ScheduledEntityType$Serializer; public synthetic fun (ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun equals (Ljava/lang/Object;)Z public final fun getValue ()I @@ -7991,16 +7980,6 @@ public final class dev/kord/common/entity/ScheduledEntityType$External : dev/kor public static final field INSTANCE Ldev/kord/common/entity/ScheduledEntityType$External; } -public final class dev/kord/common/entity/ScheduledEntityType$Serializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Ldev/kord/common/entity/ScheduledEntityType$Serializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/kord/common/entity/ScheduledEntityType; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/kord/common/entity/ScheduledEntityType;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public final synthetic fun serializer ()Lkotlinx/serialization/KSerializer; -} - public final class dev/kord/common/entity/ScheduledEntityType$StageInstance : dev/kord/common/entity/ScheduledEntityType { public static final field INSTANCE Ldev/kord/common/entity/ScheduledEntityType$StageInstance; } @@ -8077,7 +8056,6 @@ public final class dev/kord/common/entity/SortOrderType$Unknown : dev/kord/commo public abstract class dev/kord/common/entity/StageInstancePrivacyLevel { public static final field Companion Ldev/kord/common/entity/StageInstancePrivacyLevel$Companion; - public static final field Serializer Ldev/kord/common/entity/StageInstancePrivacyLevel$Serializer; public synthetic fun (ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun equals (Ljava/lang/Object;)Z public final fun getValue ()I @@ -8098,16 +8076,6 @@ public final class dev/kord/common/entity/StageInstancePrivacyLevel$Public : dev public static final field INSTANCE Ldev/kord/common/entity/StageInstancePrivacyLevel$Public; } -public final class dev/kord/common/entity/StageInstancePrivacyLevel$Serializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Ldev/kord/common/entity/StageInstancePrivacyLevel$Serializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/kord/common/entity/StageInstancePrivacyLevel; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/kord/common/entity/StageInstancePrivacyLevel;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public final synthetic fun serializer ()Lkotlinx/serialization/KSerializer; -} - public final class dev/kord/common/entity/StageInstancePrivacyLevel$Unknown : dev/kord/common/entity/StageInstancePrivacyLevel { public fun (I)V } @@ -8127,7 +8095,7 @@ public final class dev/kord/common/entity/SubCommand : dev/kord/common/entity/Op public fun getType ()Ldev/kord/common/entity/ApplicationCommandOptionType; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/common/entity/SubCommand;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/common/entity/SubCommand;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/common/entity/SubCommand$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -8153,6 +8121,7 @@ public final class dev/kord/common/entity/SystemChannelFlag : java/lang/Enum { public static final field SuppressRoleSubscriptionPurchaseNotificationReplies Ldev/kord/common/entity/SystemChannelFlag; public static final field SuppressRoleSubscriptionPurchaseNotifications Ldev/kord/common/entity/SystemChannelFlag; public final fun getCode ()I + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Ldev/kord/common/entity/SystemChannelFlag; public static fun values ()[Ldev/kord/common/entity/SystemChannelFlag; } @@ -8181,7 +8150,6 @@ public final class dev/kord/common/entity/SystemChannelFlags$Companion : kotlinx public abstract class dev/kord/common/entity/TeamMembershipState { public static final field Companion Ldev/kord/common/entity/TeamMembershipState$Companion; - public static final field TeamMembershipStateSerializer Ldev/kord/common/entity/TeamMembershipState$TeamMembershipStateSerializer; public synthetic fun (ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun equals (Ljava/lang/Object;)Z public final fun getValue ()I @@ -8202,16 +8170,6 @@ public final class dev/kord/common/entity/TeamMembershipState$Invited : dev/kord public static final field INSTANCE Ldev/kord/common/entity/TeamMembershipState$Invited; } -public final class dev/kord/common/entity/TeamMembershipState$TeamMembershipStateSerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Ldev/kord/common/entity/TeamMembershipState$TeamMembershipStateSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/kord/common/entity/TeamMembershipState; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/kord/common/entity/TeamMembershipState;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public final synthetic fun serializer ()Lkotlinx/serialization/KSerializer; -} - public final class dev/kord/common/entity/TeamMembershipState$Unknown : dev/kord/common/entity/TeamMembershipState { public fun (I)V } @@ -8260,6 +8218,7 @@ public final class dev/kord/common/entity/UserFlag : java/lang/Enum { public static final field VerifiedBot Ldev/kord/common/entity/UserFlag; public static final field VerifiedBotDeveloper Ldev/kord/common/entity/UserFlag; public final fun getCode ()I + public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Ldev/kord/common/entity/UserFlag; public static fun values ()[Ldev/kord/common/entity/UserFlag; } @@ -8549,6 +8508,7 @@ public final class dev/kord/common/entity/optional/OptionalKt { public static final fun flatMap (Ldev/kord/common/entity/optional/Optional;Lkotlin/jvm/functions/Function1;)Ldev/kord/common/entity/optional/Optional; public static final fun map (Ldev/kord/common/entity/optional/Optional;Lkotlin/jvm/functions/Function1;)Ldev/kord/common/entity/optional/Optional; public static final fun mapCopy (Ldev/kord/common/entity/optional/Optional;)Ldev/kord/common/entity/optional/Optional; + public static final fun mapCopyOfMap (Ldev/kord/common/entity/optional/Optional;)Ldev/kord/common/entity/optional/Optional; public static final fun mapList (Ldev/kord/common/entity/optional/Optional;Lkotlin/jvm/functions/Function1;)Ldev/kord/common/entity/optional/Optional; public static final fun mapNotNull (Ldev/kord/common/entity/optional/Optional;Lkotlin/jvm/functions/Function1;)Ldev/kord/common/entity/optional/Optional; public static final fun mapNullable (Ldev/kord/common/entity/optional/Optional;Lkotlin/jvm/functions/Function1;)Ldev/kord/common/entity/optional/Optional; @@ -8705,6 +8665,15 @@ public final class dev/kord/common/serialization/DurationInDaysSerializer : dev/ public static final field INSTANCE Ldev/kord/common/serialization/DurationInDaysSerializer; } +public final class dev/kord/common/serialization/DurationInDoubleSecondsSerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Ldev/kord/common/serialization/DurationInDoubleSecondsSerializer; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun deserialize-5sfh64U (Lkotlinx/serialization/encoding/Decoder;)J + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun serialize-HG0u8IE (Lkotlinx/serialization/encoding/Encoder;J)V +} + public final class dev/kord/common/serialization/DurationInHoursSerializer : dev/kord/common/serialization/DurationAsLongSerializer { public static final field INSTANCE Ldev/kord/common/serialization/DurationInHoursSerializer; } diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 3975a46823f0..1d592ab41f00 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -1,4 +1,3 @@ -@Suppress("DSL_SCOPE_VIOLATION") // false positive for `libs` in IntelliJ plugins { `kord-multiplatform-module` `kord-publishing` @@ -61,7 +60,7 @@ buildConfig { internalVisibility = true } - buildConfigField("String", "BUILD_CONFIG_GENERATED_LIBRARY_VERSION", "\"${Library.version}\"") - buildConfigField("String", "BUILD_CONFIG_GENERATED_COMMIT_HASH", "\"${Library.commitHash}\"") - buildConfigField("String", "BUILD_CONFIG_GENERATED_SHORT_COMMIT_HASH", "\"${Library.shortCommitHash}\"") + buildConfigField("String", "BUILD_CONFIG_GENERATED_LIBRARY_VERSION", "\"$libraryVersion\"") + buildConfigField("String", "BUILD_CONFIG_GENERATED_COMMIT_HASH", "\"$commitHash\"") + buildConfigField("String", "BUILD_CONFIG_GENERATED_SHORT_COMMIT_HASH", "\"$shortCommitHash\"") } diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ActivityType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ActivityType.kt new file mode 100644 index 000000000000..c5ba2fd3f755 --- /dev/null +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ActivityType.kt @@ -0,0 +1,91 @@ +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! +@file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", + "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) + +package dev.kord.common.entity + +import kotlin.LazyThreadSafetyMode.PUBLICATION +import kotlinx.serialization.KSerializer +import kotlinx.serialization.Serializable +import kotlinx.serialization.descriptors.PrimitiveKind +import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor +import kotlinx.serialization.descriptors.SerialDescriptor +import kotlinx.serialization.encoding.Decoder +import kotlinx.serialization.encoding.Encoder + +/** + * See [ActivityType]s in the + * [Discord Developer Documentation](https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types). + */ +@Serializable(with = ActivityType.Serializer::class) +public sealed class ActivityType( + /** + * The raw code used by Discord. + */ + public val code: Int, +) { + final override fun equals(other: Any?): Boolean = this === other || + (other is ActivityType && this.code == other.code) + + final override fun hashCode(): Int = code.hashCode() + + final override fun toString(): String = "ActivityType.${this::class.simpleName}(code=$code)" + + /** + * An unknown [ActivityType]. + * + * This is used as a fallback for [ActivityType]s that haven't been added to Kord yet. + */ + public class Unknown( + code: Int, + ) : ActivityType(code) + + public object Game : ActivityType(0) + + public object Streaming : ActivityType(1) + + public object Listening : ActivityType(2) + + public object Watching : ActivityType(3) + + public object Custom : ActivityType(4) + + public object Competing : ActivityType(5) + + internal object Serializer : KSerializer { + override val descriptor: SerialDescriptor = + PrimitiveSerialDescriptor("dev.kord.common.entity.ActivityType", PrimitiveKind.INT) + + override fun serialize(encoder: Encoder, `value`: ActivityType) { + encoder.encodeInt(value.code) + } + + override fun deserialize(decoder: Decoder): ActivityType = + when (val code = decoder.decodeInt()) { + 0 -> Game + 1 -> Streaming + 2 -> Listening + 3 -> Watching + 4 -> Custom + 5 -> Competing + else -> Unknown(code) + } + } + + public companion object { + /** + * A [List] of all known [ActivityType]s. + */ + public val entries: List by lazy(mode = PUBLICATION) { + listOf( + Game, + Streaming, + Listening, + Watching, + Custom, + Competing, + ) + } + + } +} diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AllowedMentionType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AllowedMentionType.kt index 7e0809b33c70..14d65ad5fb4f 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AllowedMentionType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AllowedMentionType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class AllowedMentionType( */ public val `value`: String, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is AllowedMentionType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "AllowedMentionType.${this::class.simpleName}(value=$value)" /** @@ -63,14 +57,15 @@ public sealed class AllowedMentionType( public object EveryoneMentions : AllowedMentionType("everyone") internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.AllowedMentionType", PrimitiveKind.STRING) - public override fun serialize(encoder: Encoder, `value`: AllowedMentionType) = - encoder.encodeString(value.value) + override fun serialize(encoder: Encoder, `value`: AllowedMentionType) { + encoder.encodeString(value.value) + } - public override fun deserialize(decoder: Decoder) = + override fun deserialize(decoder: Decoder): AllowedMentionType = when (val value = decoder.decodeString()) { "roles" -> RoleMentions "users" -> UserMentions diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandOptionType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandOptionType.kt index 3009f6405875..d04de5de8d73 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandOptionType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandOptionType.kt @@ -1,14 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -28,12 +24,12 @@ public sealed class ApplicationCommandOptionType( */ public val type: Int, ) { - public final override fun equals(other: Any?): kotlin.Boolean = this === other || + final override fun equals(other: Any?): kotlin.Boolean = this === other || (other is ApplicationCommandOptionType && this.type == other.type) - public final override fun hashCode(): Int = type.hashCode() + final override fun hashCode(): Int = type.hashCode() - public final override fun toString(): kotlin.String = + final override fun toString(): kotlin.String = "ApplicationCommandOptionType.${this::class.simpleName}(type=$type)" /** @@ -81,14 +77,16 @@ public sealed class ApplicationCommandOptionType( public object Attachment : ApplicationCommandOptionType(11) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.ApplicationCommandOptionType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: ApplicationCommandOptionType) = - encoder.encodeInt(value.type) + override fun serialize(encoder: Encoder, `value`: ApplicationCommandOptionType) { + encoder.encodeInt(value.type) + } - public override fun deserialize(decoder: Decoder) = when (val type = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): ApplicationCommandOptionType = + when (val type = decoder.decodeInt()) { 1 -> SubCommand 2 -> SubCommandGroup 3 -> String diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandPermissionType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandPermissionType.kt index f98288a8e2de..0a8721eb3eeb 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandPermissionType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandPermissionType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class ApplicationCommandPermissionType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is ApplicationCommandPermissionType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "ApplicationCommandPermissionType.${this::class.simpleName}(value=$value)" /** @@ -55,14 +49,16 @@ public sealed class ApplicationCommandPermissionType( public object Channel : ApplicationCommandPermissionType(3) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.ApplicationCommandPermissionType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: ApplicationCommandPermissionType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: ApplicationCommandPermissionType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): ApplicationCommandPermissionType = + when (val value = decoder.decodeInt()) { 1 -> Role 2 -> User 3 -> Channel diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandType.kt index 37540d3e6b56..a2d52294ee0b 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationCommandType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class ApplicationCommandType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is ApplicationCommandType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "ApplicationCommandType.${this::class.simpleName}(value=$value)" /** @@ -63,14 +57,16 @@ public sealed class ApplicationCommandType( public object Message : ApplicationCommandType(3) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.ApplicationCommandType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: ApplicationCommandType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: ApplicationCommandType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): ApplicationCommandType = + when (val value = decoder.decodeInt()) { 1 -> ChatInput 2 -> User 3 -> Message diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationRoleConnectionMetadataType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationRoleConnectionMetadataType.kt new file mode 100644 index 000000000000..9e209e048c32 --- /dev/null +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ApplicationRoleConnectionMetadataType.kt @@ -0,0 +1,136 @@ +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! +@file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", + "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) + +package dev.kord.common.entity + +import kotlin.LazyThreadSafetyMode.PUBLICATION +import kotlinx.serialization.KSerializer +import kotlinx.serialization.Serializable +import kotlinx.serialization.descriptors.PrimitiveKind +import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor +import kotlinx.serialization.descriptors.SerialDescriptor +import kotlinx.serialization.encoding.Decoder +import kotlinx.serialization.encoding.Encoder + +/** + * Each [ApplicationRoleConnectionMetadataType] offers a comparison operation that allows guilds to + * configure role requirements based on metadata values stored by the bot. Bots specify a 'metadata + * value' for each user and guilds specify the required 'guild's configured value' within the guild + * role settings. + * + * See [ApplicationRoleConnectionMetadataType]s in the + * [Discord Developer Documentation](https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type). + */ +@Serializable(with = ApplicationRoleConnectionMetadataType.Serializer::class) +public sealed class ApplicationRoleConnectionMetadataType( + /** + * The raw value used by Discord. + */ + public val `value`: Int, +) { + final override fun equals(other: Any?): Boolean = this === other || + (other is ApplicationRoleConnectionMetadataType && this.value == other.value) + + final override fun hashCode(): Int = value.hashCode() + + final override fun toString(): String = + "ApplicationRoleConnectionMetadataType.${this::class.simpleName}(value=$value)" + + /** + * An unknown [ApplicationRoleConnectionMetadataType]. + * + * This is used as a fallback for [ApplicationRoleConnectionMetadataType]s that haven't been + * added to Kord yet. + */ + public class Unknown( + `value`: Int, + ) : ApplicationRoleConnectionMetadataType(value) + + /** + * The metadata value (`integer`) is less than or equal to the guild's configured value + * (`integer`). + */ + public object IntegerLessThanOrEqual : ApplicationRoleConnectionMetadataType(1) + + /** + * The metadata value (`integer`) is greater than or equal to the guild's configured value + * (`integer`). + */ + public object IntegerGreaterThanOrEqual : ApplicationRoleConnectionMetadataType(2) + + /** + * The metadata value (`integer`) is equal to the guild's configured value (`integer`). + */ + public object IntegerEqual : ApplicationRoleConnectionMetadataType(3) + + /** + * The metadata value (`integer`) is not equal to the guild's configured value (`integer`). + */ + public object IntegerNotEqual : ApplicationRoleConnectionMetadataType(4) + + /** + * The metadata value (`ISO8601 string`) is less than or equal to the guild's configured value + * (`integer`; `days before current date`). + */ + public object DateTimeLessThanOrEqual : ApplicationRoleConnectionMetadataType(5) + + /** + * The metadata value (`ISO8601 string`) is greater than or equal to the guild's configured + * value (`integer`; `days before current date`). + */ + public object DateTimeGreaterThanOrEqual : ApplicationRoleConnectionMetadataType(6) + + /** + * The metadata value (`integer`) is equal to the guild's configured value (`integer`; `1`). + */ + public object BooleanEqual : ApplicationRoleConnectionMetadataType(7) + + /** + * The metadata value (`integer`) is not equal to the guild's configured value (`integer`; `1`). + */ + public object BooleanNotEqual : ApplicationRoleConnectionMetadataType(8) + + internal object Serializer : KSerializer { + override val descriptor: SerialDescriptor = + PrimitiveSerialDescriptor("dev.kord.common.entity.ApplicationRoleConnectionMetadataType", + PrimitiveKind.INT) + + override fun serialize(encoder: Encoder, `value`: ApplicationRoleConnectionMetadataType) { + encoder.encodeInt(value.value) + } + + override fun deserialize(decoder: Decoder): ApplicationRoleConnectionMetadataType = + when (val value = decoder.decodeInt()) { + 1 -> IntegerLessThanOrEqual + 2 -> IntegerGreaterThanOrEqual + 3 -> IntegerEqual + 4 -> IntegerNotEqual + 5 -> DateTimeLessThanOrEqual + 6 -> DateTimeGreaterThanOrEqual + 7 -> BooleanEqual + 8 -> BooleanNotEqual + else -> Unknown(value) + } + } + + public companion object { + /** + * A [List] of all known [ApplicationRoleConnectionMetadataType]s. + */ + public val entries: List by + lazy(mode = PUBLICATION) { + listOf( + IntegerLessThanOrEqual, + IntegerGreaterThanOrEqual, + IntegerEqual, + IntegerNotEqual, + DateTimeLessThanOrEqual, + DateTimeGreaterThanOrEqual, + BooleanEqual, + BooleanNotEqual, + ) + } + + } +} diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AuditLogEvent.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AuditLogEvent.kt index 81ac1e4e0148..bc7dcffc6153 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AuditLogEvent.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AuditLogEvent.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class AuditLogEvent( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is AuditLogEvent && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "AuditLogEvent.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "AuditLogEvent.${this::class.simpleName}(value=$value)" /** * An unknown [AuditLogEvent]. @@ -318,13 +311,15 @@ public sealed class AuditLogEvent( public object AutoModerationUserCommunicationDisabled : AuditLogEvent(145) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.AuditLogEvent", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: AuditLogEvent) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: AuditLogEvent) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): AuditLogEvent = + when (val value = decoder.decodeInt()) { 1 -> GuildUpdate 10 -> ChannelCreate 11 -> ChannelUpdate diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationActionType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationActionType.kt index 2dd057cf911e..13fa66327a50 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationActionType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationActionType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -32,12 +26,12 @@ public sealed class AutoModerationActionType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is AutoModerationActionType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "AutoModerationActionType.${this::class.simpleName}(value=$value)" /** @@ -74,14 +68,16 @@ public sealed class AutoModerationActionType( public object Timeout : AutoModerationActionType(3) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.AutoModerationActionType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: AutoModerationActionType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: AutoModerationActionType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): AutoModerationActionType = + when (val value = decoder.decodeInt()) { 1 -> BlockMessage 2 -> SendAlertMessage 3 -> Timeout diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleEventType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleEventType.kt index 7f285d457160..25e4056c19c2 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleEventType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleEventType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -32,12 +26,12 @@ public sealed class AutoModerationRuleEventType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is AutoModerationRuleEventType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "AutoModerationRuleEventType.${this::class.simpleName}(value=$value)" /** @@ -56,14 +50,16 @@ public sealed class AutoModerationRuleEventType( public object MessageSend : AutoModerationRuleEventType(1) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.AutoModerationRuleEventType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: AutoModerationRuleEventType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: AutoModerationRuleEventType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): AutoModerationRuleEventType = + when (val value = decoder.decodeInt()) { 1 -> MessageSend else -> Unknown(value) } diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleKeywordPresetType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleKeywordPresetType.kt index 0fd6bd7c1ce8..663350fcb1cb 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleKeywordPresetType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleKeywordPresetType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -32,12 +26,12 @@ public sealed class AutoModerationRuleKeywordPresetType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is AutoModerationRuleKeywordPresetType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "AutoModerationRuleKeywordPresetType.${this::class.simpleName}(value=$value)" /** @@ -66,14 +60,16 @@ public sealed class AutoModerationRuleKeywordPresetType( public object Slurs : AutoModerationRuleKeywordPresetType(3) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.AutoModerationRuleKeywordPresetType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, - `value`: AutoModerationRuleKeywordPresetType) = encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: AutoModerationRuleKeywordPresetType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): AutoModerationRuleKeywordPresetType = + when (val value = decoder.decodeInt()) { 1 -> Profanity 2 -> SexualContent 3 -> Slurs diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleTriggerType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleTriggerType.kt index 38d7f7282d96..66135a2a1aae 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleTriggerType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/AutoModerationRuleTriggerType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -32,12 +26,12 @@ public sealed class AutoModerationRuleTriggerType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is AutoModerationRuleTriggerType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "AutoModerationRuleTriggerType.${this::class.simpleName}(value=$value)" /** @@ -71,14 +65,16 @@ public sealed class AutoModerationRuleTriggerType( public object MentionSpam : AutoModerationRuleTriggerType(5) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.AutoModerationRuleTriggerType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: AutoModerationRuleTriggerType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: AutoModerationRuleTriggerType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): AutoModerationRuleTriggerType = + when (val value = decoder.decodeInt()) { 1 -> Keyword 3 -> Spam 4 -> KeywordPreset diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ButtonStyle.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ButtonStyle.kt index 1e61d640d012..01f0010c0848 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ButtonStyle.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ButtonStyle.kt @@ -1,20 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Deprecated -import kotlin.DeprecationLevel -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.ReplaceWith -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List -import kotlin.jvm.JvmField import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -29,20 +19,19 @@ import kotlinx.serialization.encoding.Encoder * See [ButtonStyle]s in the * [Discord Developer Documentation](https://discord.com/developers/docs/interactions/message-components#button-object-button-styles). */ -@Serializable(with = ButtonStyle.NewSerializer::class) +@Serializable(with = ButtonStyle.Serializer::class) public sealed class ButtonStyle( /** * The raw value used by Discord. */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is ButtonStyle && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "ButtonStyle.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "ButtonStyle.${this::class.simpleName}(value=$value)" /** * An unknown [ButtonStyle]. @@ -78,14 +67,16 @@ public sealed class ButtonStyle( */ public object Link : ButtonStyle(5) - internal object NewSerializer : KSerializer { - public override val descriptor: SerialDescriptor = + internal object Serializer : KSerializer { + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.ButtonStyle", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: ButtonStyle) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: ButtonStyle) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): ButtonStyle = + when (val value = decoder.decodeInt()) { 1 -> Primary 2 -> Secondary 3 -> Success @@ -95,22 +86,6 @@ public sealed class ButtonStyle( } } - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Use 'ButtonStyle.serializer()' instead.", - replaceWith = ReplaceWith(expression = "ButtonStyle.serializer()", imports = - arrayOf("dev.kord.common.entity.ButtonStyle")), - ) - public object Serializer : KSerializer by NewSerializer { - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Use 'ButtonStyle.serializer()' instead.", - replaceWith = ReplaceWith(expression = "ButtonStyle.serializer()", imports = - arrayOf("dev.kord.common.entity.ButtonStyle")), - ) - public fun serializer(): KSerializer = this - } - public companion object { /** * A [List] of all known [ButtonStyle]s. @@ -125,13 +100,5 @@ public sealed class ButtonStyle( ) } - - @Suppress(names = arrayOf("DEPRECATION_ERROR")) - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Binary compatibility", - ) - @JvmField - public val Serializer: Serializer = Serializer } } diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ChannelType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ChannelType.kt index 04a3e6b1db63..2b625a585d51 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ChannelType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ChannelType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class ChannelType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is ChannelType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "ChannelType.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "ChannelType.${this::class.simpleName}(value=$value)" /** * An unknown [ChannelType]. @@ -115,13 +108,15 @@ public sealed class ChannelType( public object GuildForum : ChannelType(15) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.ChannelType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: ChannelType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: ChannelType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): ChannelType = + when (val value = decoder.decodeInt()) { 0 -> GuildText 1 -> DM 2 -> GuildVoice diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ComponentType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ComponentType.kt index b1640f27c92a..c874b6ec23f7 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ComponentType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ComponentType.kt @@ -1,20 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Deprecated -import kotlin.DeprecationLevel -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.ReplaceWith -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List -import kotlin.jvm.JvmField import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -27,20 +17,19 @@ import kotlinx.serialization.encoding.Encoder * See [ComponentType]s in the * [Discord Developer Documentation](https://discord.com/developers/docs/interactions/message-components#component-object-component-types). */ -@Serializable(with = ComponentType.NewSerializer::class) +@Serializable(with = ComponentType.Serializer::class) public sealed class ComponentType( /** * The raw value used by Discord. */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is ComponentType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "ComponentType.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "ComponentType.${this::class.simpleName}(value=$value)" /** * An unknown [ComponentType]. @@ -91,25 +80,16 @@ public sealed class ComponentType( */ public object ChannelSelect : ComponentType(8) - /** - * A select menu for picking from choices. - */ - @Deprecated( - level = DeprecationLevel.ERROR, - message = "Renamed by discord", - replaceWith = ReplaceWith(expression = "StringSelect", imports = - arrayOf("dev.kord.common.entity.ComponentType.StringSelect")), - ) - public object SelectMenu : ComponentType(3) - - internal object NewSerializer : KSerializer { - public override val descriptor: SerialDescriptor = + internal object Serializer : KSerializer { + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.ComponentType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: ComponentType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: ComponentType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): ComponentType = + when (val value = decoder.decodeInt()) { 1 -> ActionRow 2 -> Button 3 -> StringSelect @@ -122,22 +102,6 @@ public sealed class ComponentType( } } - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Use 'ComponentType.serializer()' instead.", - replaceWith = ReplaceWith(expression = "ComponentType.serializer()", imports = - arrayOf("dev.kord.common.entity.ComponentType")), - ) - public object Serializer : KSerializer by NewSerializer { - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Use 'ComponentType.serializer()' instead.", - replaceWith = ReplaceWith(expression = "ComponentType.serializer()", imports = - arrayOf("dev.kord.common.entity.ComponentType")), - ) - public fun serializer(): KSerializer = this - } - public companion object { /** * A [List] of all known [ComponentType]s. @@ -155,13 +119,5 @@ public sealed class ComponentType( ) } - - @Suppress(names = arrayOf("DEPRECATION_ERROR")) - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Binary compatibility", - ) - @JvmField - public val Serializer: Serializer = Serializer } } diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/DefaultMessageNotificationLevel.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/DefaultMessageNotificationLevel.kt index 2f67ffa23031..c8ec1246bda8 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/DefaultMessageNotificationLevel.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/DefaultMessageNotificationLevel.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class DefaultMessageNotificationLevel( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is DefaultMessageNotificationLevel && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "DefaultMessageNotificationLevel.${this::class.simpleName}(value=$value)" /** @@ -59,14 +53,16 @@ public sealed class DefaultMessageNotificationLevel( public object OnlyMentions : DefaultMessageNotificationLevel(1) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.DefaultMessageNotificationLevel", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: DefaultMessageNotificationLevel) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: DefaultMessageNotificationLevel) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): DefaultMessageNotificationLevel = + when (val value = decoder.decodeInt()) { 0 -> AllMessages 1 -> OnlyMentions else -> Unknown(value) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/DiscordConnectionVisibility.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/DiscordConnectionVisibility.kt index 5ac2c352fc18..2060887d0409 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/DiscordConnectionVisibility.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/DiscordConnectionVisibility.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class DiscordConnectionVisibility( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is DiscordConnectionVisibility && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "DiscordConnectionVisibility.${this::class.simpleName}(value=$value)" /** @@ -59,14 +53,16 @@ public sealed class DiscordConnectionVisibility( public object Everyone : DiscordConnectionVisibility(1) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.DiscordConnectionVisibility", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: DiscordConnectionVisibility) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: DiscordConnectionVisibility) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): DiscordConnectionVisibility = + when (val value = decoder.decodeInt()) { 0 -> None 1 -> Everyone else -> Unknown(value) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/EmbedType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/EmbedType.kt index 7922959a0fbc..92fbefbab02b 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/EmbedType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/EmbedType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class EmbedType( */ public val `value`: String, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is EmbedType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "EmbedType.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "EmbedType.${this::class.simpleName}(value=$value)" /** * An unknown [EmbedType]. @@ -78,13 +71,14 @@ public sealed class EmbedType( public object Link : EmbedType("link") internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.EmbedType", PrimitiveKind.STRING) - public override fun serialize(encoder: Encoder, `value`: EmbedType) = - encoder.encodeString(value.value) + override fun serialize(encoder: Encoder, `value`: EmbedType) { + encoder.encodeString(value.value) + } - public override fun deserialize(decoder: Decoder) = + override fun deserialize(decoder: Decoder): EmbedType = when (val value = decoder.decodeString()) { "rich" -> Rich "image" -> Image diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ExplicitContentFilter.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ExplicitContentFilter.kt index b8f46401e9e6..ee9c6ffc9bf0 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ExplicitContentFilter.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ExplicitContentFilter.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class ExplicitContentFilter( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is ExplicitContentFilter && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "ExplicitContentFilter.${this::class.simpleName}(value=$value)" /** @@ -63,14 +57,16 @@ public sealed class ExplicitContentFilter( public object AllMembers : ExplicitContentFilter(2) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.ExplicitContentFilter", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: ExplicitContentFilter) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: ExplicitContentFilter) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): ExplicitContentFilter = + when (val value = decoder.decodeInt()) { 0 -> Disabled 1 -> MembersWithoutRoles 2 -> AllMembers diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ForumLayoutType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ForumLayoutType.kt index b611756d4120..0dd349bb04ce 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ForumLayoutType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ForumLayoutType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class ForumLayoutType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is ForumLayoutType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "ForumLayoutType.${this::class.simpleName}(value=$value)" /** @@ -63,14 +57,16 @@ public sealed class ForumLayoutType( public object GalleryView : ForumLayoutType(2) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.ForumLayoutType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: ForumLayoutType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: ForumLayoutType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): ForumLayoutType = + when (val value = decoder.decodeInt()) { 0 -> NotSet 1 -> ListView 2 -> GalleryView diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildFeature.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildFeature.kt index 0bc82d268fba..24b1062016c3 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildFeature.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildFeature.kt @@ -1,19 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Deprecated -import kotlin.DeprecationLevel -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.ReplaceWith -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -33,13 +24,12 @@ public sealed class GuildFeature( */ public val `value`: String, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is GuildFeature && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "GuildFeature.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "GuildFeature.${this::class.simpleName}(value=$value)" /** * An unknown [GuildFeature]. @@ -142,6 +132,11 @@ public sealed class GuildFeature( */ public object PreviewEnabled : GuildFeature("PREVIEW_ENABLED") + /** + * Guild has disabled alerts for join raids in the configured safety alerts channel. + */ + public object RaidAlertsDisabled : GuildFeature("RAID_ALERTS_DISABLED") + /** * Guild is able to set role icons. */ @@ -183,35 +178,16 @@ public sealed class GuildFeature( */ public object WelcomeScreenEnabled : GuildFeature("WELCOME_SCREEN_ENABLED") - /** - * Guild has enabled monetization. - */ - @Deprecated( - level = DeprecationLevel.ERROR, - message = "Replaced by CreatorMonetizableProvisional.", - replaceWith = ReplaceWith(expression = "GuildFeature.CreatorMonetizableProvisional", imports - = arrayOf("dev.kord.common.entitiy.GuildFeature")), - ) - public object MonetizationEnabled : GuildFeature("MONETIZATION_ENABLED") - - /** - * Guild has access to create private threads - */ - @Deprecated( - level = DeprecationLevel.ERROR, - message = "Creating a private thread no longer requires the server to be boosted.", - ) - public object PrivateThreads : GuildFeature("PRIVATE_THREADS") - internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.GuildFeature", PrimitiveKind.STRING) - public override fun serialize(encoder: Encoder, `value`: GuildFeature) = - encoder.encodeString(value.value) + override fun serialize(encoder: Encoder, `value`: GuildFeature) { + encoder.encodeString(value.value) + } - public override fun deserialize(decoder: Decoder) = + override fun deserialize(decoder: Decoder): GuildFeature = when (val value = decoder.decodeString()) { "ANIMATED_BANNER" -> AnimatedBanner "ANIMATED_ICON" -> AnimatedIcon @@ -227,12 +203,11 @@ public sealed class GuildFeature( "INVITES_DISABLED" -> InvitesDisabled "INVITE_SPLASH" -> InviteSplash "MEMBER_VERIFICATION_GATE_ENABLED" -> MemberVerificationGateEnabled - "MONETIZATION_ENABLED" -> @Suppress("DEPRECATION_ERROR") MonetizationEnabled "MORE_STICKERS" -> MoreStickers "NEWS" -> News "PARTNERED" -> Partnered "PREVIEW_ENABLED" -> PreviewEnabled - "PRIVATE_THREADS" -> @Suppress("DEPRECATION_ERROR") PrivateThreads + "RAID_ALERTS_DISABLED" -> RaidAlertsDisabled "ROLE_ICONS" -> RoleIcons "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE" -> RoleSubscriptionsAvailableForPurchase "ROLE_SUBSCRIPTIONS_ENABLED" -> RoleSubscriptionsEnabled @@ -265,12 +240,11 @@ public sealed class GuildFeature( InvitesDisabled, InviteSplash, MemberVerificationGateEnabled, - @Suppress("DEPRECATION_ERROR") MonetizationEnabled, MoreStickers, News, Partnered, PreviewEnabled, - @Suppress("DEPRECATION_ERROR") PrivateThreads, + RaidAlertsDisabled, RoleIcons, RoleSubscriptionsAvailableForPurchase, RoleSubscriptionsEnabled, diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildScheduledEventPrivacyLevel.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildScheduledEventPrivacyLevel.kt index 99cea88ebdc1..f0998d030a70 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildScheduledEventPrivacyLevel.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildScheduledEventPrivacyLevel.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class GuildScheduledEventPrivacyLevel( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is GuildScheduledEventPrivacyLevel && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "GuildScheduledEventPrivacyLevel.${this::class.simpleName}(value=$value)" /** @@ -54,14 +48,16 @@ public sealed class GuildScheduledEventPrivacyLevel( public object GuildOnly : GuildScheduledEventPrivacyLevel(2) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.GuildScheduledEventPrivacyLevel", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: GuildScheduledEventPrivacyLevel) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: GuildScheduledEventPrivacyLevel) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): GuildScheduledEventPrivacyLevel = + when (val value = decoder.decodeInt()) { 2 -> GuildOnly else -> Unknown(value) } diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildScheduledEventStatus.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildScheduledEventStatus.kt index bc70863d26ff..072c5fc6d872 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildScheduledEventStatus.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/GuildScheduledEventStatus.kt @@ -1,20 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Deprecated -import kotlin.DeprecationLevel -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.ReplaceWith -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List -import kotlin.jvm.JvmField import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -27,19 +17,19 @@ import kotlinx.serialization.encoding.Encoder * See [GuildScheduledEventStatus]s in the * [Discord Developer Documentation](https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status). */ -@Serializable(with = GuildScheduledEventStatus.NewSerializer::class) +@Serializable(with = GuildScheduledEventStatus.Serializer::class) public sealed class GuildScheduledEventStatus( /** * The raw value used by Discord. */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is GuildScheduledEventStatus && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "GuildScheduledEventStatus.${this::class.simpleName}(value=$value)" /** @@ -60,15 +50,17 @@ public sealed class GuildScheduledEventStatus( public object Cancelled : GuildScheduledEventStatus(4) - internal object NewSerializer : KSerializer { - public override val descriptor: SerialDescriptor = + internal object Serializer : KSerializer { + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.GuildScheduledEventStatus", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: GuildScheduledEventStatus) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: GuildScheduledEventStatus) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): GuildScheduledEventStatus = + when (val value = decoder.decodeInt()) { 1 -> Scheduled 2 -> Active 3 -> Completed @@ -77,22 +69,6 @@ public sealed class GuildScheduledEventStatus( } } - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Use 'GuildScheduledEventStatus.serializer()' instead.", - replaceWith = ReplaceWith(expression = "GuildScheduledEventStatus.serializer()", imports = - arrayOf("dev.kord.common.entity.GuildScheduledEventStatus")), - ) - public object Serializer : KSerializer by NewSerializer { - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Use 'GuildScheduledEventStatus.serializer()' instead.", - replaceWith = ReplaceWith(expression = "GuildScheduledEventStatus.serializer()", imports - = arrayOf("dev.kord.common.entity.GuildScheduledEventStatus")), - ) - public fun serializer(): KSerializer = this - } - public companion object { /** * A [List] of all known [GuildScheduledEventStatus]s. @@ -106,13 +82,5 @@ public sealed class GuildScheduledEventStatus( ) } - - @Suppress(names = arrayOf("DEPRECATION_ERROR")) - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Binary compatibility", - ) - @JvmField - public val Serializer: Serializer = Serializer } } diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/IntegrationExpireBehavior.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/IntegrationExpireBehavior.kt index be12f6c672e9..851a8a4aa47a 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/IntegrationExpireBehavior.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/IntegrationExpireBehavior.kt @@ -1,20 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Deprecated -import kotlin.DeprecationLevel -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.ReplaceWith -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List -import kotlin.jvm.JvmField import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -27,19 +17,19 @@ import kotlinx.serialization.encoding.Encoder * See [IntegrationExpireBehavior]s in the * [Discord Developer Documentation](https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors). */ -@Serializable(with = IntegrationExpireBehavior.NewSerializer::class) +@Serializable(with = IntegrationExpireBehavior.Serializer::class) public sealed class IntegrationExpireBehavior( /** * The raw value used by Discord. */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is IntegrationExpireBehavior && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "IntegrationExpireBehavior.${this::class.simpleName}(value=$value)" /** @@ -56,37 +46,23 @@ public sealed class IntegrationExpireBehavior( public object Kick : IntegrationExpireBehavior(1) - internal object NewSerializer : KSerializer { - public override val descriptor: SerialDescriptor = + internal object Serializer : KSerializer { + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.IntegrationExpireBehavior", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: IntegrationExpireBehavior) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: IntegrationExpireBehavior) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): IntegrationExpireBehavior = + when (val value = decoder.decodeInt()) { 0 -> RemoveRole 1 -> Kick else -> Unknown(value) } } - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Use 'IntegrationExpireBehavior.serializer()' instead.", - replaceWith = ReplaceWith(expression = "IntegrationExpireBehavior.serializer()", imports = - arrayOf("dev.kord.common.entity.IntegrationExpireBehavior")), - ) - public object Serializer : KSerializer by NewSerializer { - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Use 'IntegrationExpireBehavior.serializer()' instead.", - replaceWith = ReplaceWith(expression = "IntegrationExpireBehavior.serializer()", imports - = arrayOf("dev.kord.common.entity.IntegrationExpireBehavior")), - ) - public fun serializer(): KSerializer = this - } - public companion object { /** * A [List] of all known [IntegrationExpireBehavior]s. @@ -98,13 +74,5 @@ public sealed class IntegrationExpireBehavior( ) } - - @Suppress(names = arrayOf("DEPRECATION_ERROR")) - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Binary compatibility", - ) - @JvmField - public val Serializer: Serializer = Serializer } } diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InteractionResponseType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InteractionResponseType.kt index 81062aee2999..447ea96c57cc 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InteractionResponseType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InteractionResponseType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class InteractionResponseType( */ public val type: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is InteractionResponseType && this.type == other.type) - public final override fun hashCode(): Int = type.hashCode() + final override fun hashCode(): Int = type.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "InteractionResponseType.${this::class.simpleName}(type=$type)" /** @@ -85,14 +79,16 @@ public sealed class InteractionResponseType( public object Modal : InteractionResponseType(9) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.InteractionResponseType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: InteractionResponseType) = - encoder.encodeInt(value.type) + override fun serialize(encoder: Encoder, `value`: InteractionResponseType) { + encoder.encodeInt(value.type) + } - public override fun deserialize(decoder: Decoder) = when (val type = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): InteractionResponseType = + when (val type = decoder.decodeInt()) { 1 -> Pong 4 -> ChannelMessageWithSource 5 -> DeferredChannelMessageWithSource diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InteractionType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InteractionType.kt index 5cc9105e0a1c..e02279c781e7 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InteractionType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InteractionType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class InteractionType( */ public val type: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is InteractionType && this.type == other.type) - public final override fun hashCode(): Int = type.hashCode() + final override fun hashCode(): Int = type.hashCode() - public final override fun toString(): String = - "InteractionType.${this::class.simpleName}(type=$type)" + final override fun toString(): String = "InteractionType.${this::class.simpleName}(type=$type)" /** * An unknown [InteractionType]. @@ -58,14 +51,16 @@ public sealed class InteractionType( public object ModalSubmit : InteractionType(5) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.InteractionType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: InteractionType) = - encoder.encodeInt(value.type) + override fun serialize(encoder: Encoder, `value`: InteractionType) { + encoder.encodeInt(value.type) + } - public override fun deserialize(decoder: Decoder) = when (val type = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): InteractionType = + when (val type = decoder.decodeInt()) { 1 -> Ping 2 -> ApplicationCommand 3 -> Component diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InviteTargetType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InviteTargetType.kt index b2c887f81899..958b29aea793 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InviteTargetType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/InviteTargetType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class InviteTargetType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is InviteTargetType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "InviteTargetType.${this::class.simpleName}(value=$value)" /** @@ -52,14 +46,16 @@ public sealed class InviteTargetType( public object EmbeddedApplication : InviteTargetType(2) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.InviteTargetType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: InviteTargetType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: InviteTargetType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): InviteTargetType = + when (val value = decoder.decodeInt()) { 1 -> Stream 2 -> EmbeddedApplication else -> Unknown(value) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MFALevel.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MFALevel.kt index 522db376f61a..0323297c1066 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MFALevel.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MFALevel.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class MFALevel( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is MFALevel && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "MFALevel.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "MFALevel.${this::class.simpleName}(value=$value)" /** * An unknown [MFALevel]. @@ -58,13 +51,15 @@ public sealed class MFALevel( public object Elevated : MFALevel(1) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.MFALevel", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: MFALevel) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: MFALevel) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): MFALevel = + when (val value = decoder.decodeInt()) { 0 -> None 1 -> Elevated else -> Unknown(value) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageActivityType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageActivityType.kt index 5ff513a4a219..f51cb807b51f 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageActivityType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageActivityType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class MessageActivityType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is MessageActivityType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "MessageActivityType.${this::class.simpleName}(value=$value)" /** @@ -56,14 +50,16 @@ public sealed class MessageActivityType( public object JoinRequest : MessageActivityType(5) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.MessageActivityType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: MessageActivityType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: MessageActivityType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): MessageActivityType = + when (val value = decoder.decodeInt()) { 1 -> Join 2 -> Spectate 3 -> Listen diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageStickerType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageStickerType.kt index e641439efbfc..8d58e52ddef8 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageStickerType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageStickerType.kt @@ -1,20 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Deprecated -import kotlin.DeprecationLevel -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.ReplaceWith -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List -import kotlin.collections.Set import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -34,12 +24,12 @@ public sealed class MessageStickerType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is MessageStickerType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "MessageStickerType.${this::class.simpleName}(value=$value)" /** @@ -60,14 +50,16 @@ public sealed class MessageStickerType( public object GIF : MessageStickerType(4) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.MessageStickerType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: MessageStickerType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: MessageStickerType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): MessageStickerType = + when (val value = decoder.decodeInt()) { 1 -> PNG 2 -> APNG 3 -> LOTTIE @@ -89,13 +81,5 @@ public sealed class MessageStickerType( ) } - - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Renamed to 'entries'.", - replaceWith = ReplaceWith(expression = "this.entries", imports = arrayOf()), - ) - public val values: Set - get() = entries.toSet() } } diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageType.kt index 4cbc5066bae5..8638a65dcc8a 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/MessageType.kt @@ -1,20 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Deprecated -import kotlin.DeprecationLevel -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.ReplaceWith -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List -import kotlin.collections.Set import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -34,13 +24,12 @@ public sealed class MessageType( */ public val code: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is MessageType && this.code == other.code) - public final override fun hashCode(): Int = code.hashCode() + final override fun hashCode(): Int = code.hashCode() - public final override fun toString(): String = - "MessageType.${this::class.simpleName}(code=$code)" + final override fun toString(): String = "MessageType.${this::class.simpleName}(code=$code)" /** * An unknown [MessageType]. @@ -114,13 +103,15 @@ public sealed class MessageType( public object GuildApplicationPremiumSubscription : MessageType(32) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.MessageType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: MessageType) = - encoder.encodeInt(value.code) + override fun serialize(encoder: Encoder, `value`: MessageType) { + encoder.encodeInt(value.code) + } - public override fun deserialize(decoder: Decoder) = when (val code = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): MessageType = + when (val code = decoder.decodeInt()) { 0 -> Default 1 -> RecipientAdd 2 -> RecipientRemove @@ -196,13 +187,5 @@ public sealed class MessageType( ) } - - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Renamed to 'entries'.", - replaceWith = ReplaceWith(expression = "this.entries", imports = arrayOf()), - ) - public val values: Set - get() = entries.toSet() } } diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/NsfwLevel.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/NsfwLevel.kt index ed5b734e8077..7658504778fa 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/NsfwLevel.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/NsfwLevel.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class NsfwLevel( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is NsfwLevel && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "NsfwLevel.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "NsfwLevel.${this::class.simpleName}(value=$value)" /** * An unknown [NsfwLevel]. @@ -56,13 +49,15 @@ public sealed class NsfwLevel( public object AgeRestricted : NsfwLevel(3) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.NsfwLevel", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: NsfwLevel) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: NsfwLevel) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): NsfwLevel = + when (val value = decoder.decodeInt()) { 0 -> Default 1 -> Explicit 2 -> Safe diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/OnboardingPromptType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/OnboardingPromptType.kt index c4816f8c5ce0..cd87eb25dd0c 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/OnboardingPromptType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/OnboardingPromptType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class OnboardingPromptType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is OnboardingPromptType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "OnboardingPromptType.${this::class.simpleName}(value=$value)" /** @@ -52,14 +46,16 @@ public sealed class OnboardingPromptType( public object Dropdown : OnboardingPromptType(1) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.OnboardingPromptType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: OnboardingPromptType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: OnboardingPromptType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): OnboardingPromptType = + when (val value = decoder.decodeInt()) { 0 -> MultipleChoice 1 -> Dropdown else -> Unknown(value) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/OverwriteType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/OverwriteType.kt index 7f1dfff1524c..56e13231fef3 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/OverwriteType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/OverwriteType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class OverwriteType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is OverwriteType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "OverwriteType.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "OverwriteType.${this::class.simpleName}(value=$value)" /** * An unknown [OverwriteType]. @@ -52,13 +45,15 @@ public sealed class OverwriteType( public object Member : OverwriteType(1) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.OverwriteType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: OverwriteType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: OverwriteType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): OverwriteType = + when (val value = decoder.decodeInt()) { 0 -> Role 1 -> Member else -> Unknown(value) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/PremiumTier.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/PremiumTier.kt index 52ec298744e1..1e8e37c293ad 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/PremiumTier.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/PremiumTier.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class PremiumTier( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is PremiumTier && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "PremiumTier.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "PremiumTier.${this::class.simpleName}(value=$value)" /** * An unknown [PremiumTier]. @@ -68,13 +61,15 @@ public sealed class PremiumTier( public object Three : PremiumTier(3) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.PremiumTier", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: PremiumTier) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: PremiumTier) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): PremiumTier = + when (val value = decoder.decodeInt()) { 0 -> None 1 -> One 2 -> Two diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/PresenceStatus.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/PresenceStatus.kt index 0883027dbe3b..2d81d6690892 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/PresenceStatus.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/PresenceStatus.kt @@ -1,20 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Deprecated -import kotlin.DeprecationLevel -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.ReplaceWith -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List -import kotlin.jvm.JvmField import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -34,13 +24,12 @@ public sealed class PresenceStatus( */ public val `value`: String, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is PresenceStatus && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "PresenceStatus.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "PresenceStatus.${this::class.simpleName}(value=$value)" /** * An unknown [PresenceStatus]. @@ -77,14 +66,15 @@ public sealed class PresenceStatus( public object Offline : PresenceStatus("offline") internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.PresenceStatus", PrimitiveKind.STRING) - public override fun serialize(encoder: Encoder, `value`: PresenceStatus) = - encoder.encodeString(value.value) + override fun serialize(encoder: Encoder, `value`: PresenceStatus) { + encoder.encodeString(value.value) + } - public override fun deserialize(decoder: Decoder) = + override fun deserialize(decoder: Decoder): PresenceStatus = when (val value = decoder.decodeString()) { "online" -> Online "dnd" -> DoNotDisturb @@ -95,22 +85,6 @@ public sealed class PresenceStatus( } } - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Use 'PresenceStatus.serializer()' instead.", - replaceWith = ReplaceWith(expression = "PresenceStatus.serializer()", imports = - arrayOf("dev.kord.common.entity.PresenceStatus")), - ) - public object StatusSerializer : KSerializer by Serializer { - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Use 'PresenceStatus.serializer()' instead.", - replaceWith = ReplaceWith(expression = "PresenceStatus.serializer()", imports = - arrayOf("dev.kord.common.entity.PresenceStatus")), - ) - public fun serializer(): KSerializer = this - } - public companion object { /** * A [List] of all known [PresenceStatus]s. @@ -125,13 +99,5 @@ public sealed class PresenceStatus( ) } - - @Suppress(names = arrayOf("DEPRECATION_ERROR")) - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Binary compatibility", - ) - @JvmField - public val StatusSerializer: StatusSerializer = StatusSerializer } } diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ScheduledEntityType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ScheduledEntityType.kt index 7103621e6889..b14d9b75cfdf 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ScheduledEntityType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/ScheduledEntityType.kt @@ -1,20 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Deprecated -import kotlin.DeprecationLevel -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.ReplaceWith -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List -import kotlin.jvm.JvmField import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -27,19 +17,19 @@ import kotlinx.serialization.encoding.Encoder * See [ScheduledEntityType]s in the * [Discord Developer Documentation](https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types). */ -@Serializable(with = ScheduledEntityType.NewSerializer::class) +@Serializable(with = ScheduledEntityType.Serializer::class) public sealed class ScheduledEntityType( /** * The raw value used by Discord. */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is ScheduledEntityType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "ScheduledEntityType.${this::class.simpleName}(value=$value)" /** @@ -57,15 +47,17 @@ public sealed class ScheduledEntityType( public object External : ScheduledEntityType(3) - internal object NewSerializer : KSerializer { - public override val descriptor: SerialDescriptor = + internal object Serializer : KSerializer { + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.ScheduledEntityType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: ScheduledEntityType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: ScheduledEntityType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): ScheduledEntityType = + when (val value = decoder.decodeInt()) { 1 -> StageInstance 2 -> Voice 3 -> External @@ -73,22 +65,6 @@ public sealed class ScheduledEntityType( } } - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Use 'ScheduledEntityType.serializer()' instead.", - replaceWith = ReplaceWith(expression = "ScheduledEntityType.serializer()", imports = - arrayOf("dev.kord.common.entity.ScheduledEntityType")), - ) - public object Serializer : KSerializer by NewSerializer { - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Use 'ScheduledEntityType.serializer()' instead.", - replaceWith = ReplaceWith(expression = "ScheduledEntityType.serializer()", imports = - arrayOf("dev.kord.common.entity.ScheduledEntityType")), - ) - public fun serializer(): KSerializer = this - } - public companion object { /** * A [List] of all known [ScheduledEntityType]s. @@ -101,13 +77,5 @@ public sealed class ScheduledEntityType( ) } - - @Suppress(names = arrayOf("DEPRECATION_ERROR")) - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Binary compatibility", - ) - @JvmField - public val Serializer: Serializer = Serializer } } diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/SortOrderType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/SortOrderType.kt index f8ea7de7f847..3b6ac659433f 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/SortOrderType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/SortOrderType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class SortOrderType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is SortOrderType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "SortOrderType.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "SortOrderType.${this::class.simpleName}(value=$value)" /** * An unknown [SortOrderType]. @@ -58,13 +51,15 @@ public sealed class SortOrderType( public object CreationDate : SortOrderType(1) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.SortOrderType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: SortOrderType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: SortOrderType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): SortOrderType = + when (val value = decoder.decodeInt()) { 0 -> LatestActivity 1 -> CreationDate else -> Unknown(value) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/StageInstancePrivacyLevel.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/StageInstancePrivacyLevel.kt index b90dad5dc8ed..207576cdcfc7 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/StageInstancePrivacyLevel.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/StageInstancePrivacyLevel.kt @@ -1,20 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Deprecated -import kotlin.DeprecationLevel -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.ReplaceWith -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List -import kotlin.jvm.JvmField import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -27,19 +17,19 @@ import kotlinx.serialization.encoding.Encoder * See [StageInstancePrivacyLevel]s in the * [Discord Developer Documentation](https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level). */ -@Serializable(with = StageInstancePrivacyLevel.NewSerializer::class) +@Serializable(with = StageInstancePrivacyLevel.Serializer::class) public sealed class StageInstancePrivacyLevel( /** * The raw value used by Discord. */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is StageInstancePrivacyLevel && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "StageInstancePrivacyLevel.${this::class.simpleName}(value=$value)" /** @@ -52,48 +42,34 @@ public sealed class StageInstancePrivacyLevel( `value`: Int, ) : StageInstancePrivacyLevel(value) - /** - * The Stage instance is visible to only guild members. - */ - public object GuildOnly : StageInstancePrivacyLevel(2) - /** * The Stage instance is visible publicly. */ @Deprecated(message = "Stages are no longer discoverable") public object Public : StageInstancePrivacyLevel(1) - internal object NewSerializer : KSerializer { - public override val descriptor: SerialDescriptor = + /** + * The Stage instance is visible to only guild members. + */ + public object GuildOnly : StageInstancePrivacyLevel(2) + + internal object Serializer : KSerializer { + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.StageInstancePrivacyLevel", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: StageInstancePrivacyLevel) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: StageInstancePrivacyLevel) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): StageInstancePrivacyLevel = + when (val value = decoder.decodeInt()) { 1 -> @Suppress("DEPRECATION") Public 2 -> GuildOnly else -> Unknown(value) } } - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Use 'StageInstancePrivacyLevel.serializer()' instead.", - replaceWith = ReplaceWith(expression = "StageInstancePrivacyLevel.serializer()", imports = - arrayOf("dev.kord.common.entity.StageInstancePrivacyLevel")), - ) - public object Serializer : KSerializer by NewSerializer { - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Use 'StageInstancePrivacyLevel.serializer()' instead.", - replaceWith = ReplaceWith(expression = "StageInstancePrivacyLevel.serializer()", imports - = arrayOf("dev.kord.common.entity.StageInstancePrivacyLevel")), - ) - public fun serializer(): KSerializer = this - } - public companion object { /** * A [List] of all known [StageInstancePrivacyLevel]s. @@ -105,13 +81,5 @@ public sealed class StageInstancePrivacyLevel( ) } - - @Suppress(names = arrayOf("DEPRECATION_ERROR")) - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Binary compatibility", - ) - @JvmField - public val Serializer: Serializer = Serializer } } diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/TeamMembershipState.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/TeamMembershipState.kt index 9d0d97d68f90..113fd5f51a6a 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/TeamMembershipState.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/TeamMembershipState.kt @@ -1,20 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Deprecated -import kotlin.DeprecationLevel -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.ReplaceWith -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List -import kotlin.jvm.JvmField import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -34,12 +24,12 @@ public sealed class TeamMembershipState( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is TeamMembershipState && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "TeamMembershipState.${this::class.simpleName}(value=$value)" /** @@ -56,36 +46,22 @@ public sealed class TeamMembershipState( public object Accepted : TeamMembershipState(2) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.TeamMembershipState", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: TeamMembershipState) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: TeamMembershipState) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): TeamMembershipState = + when (val value = decoder.decodeInt()) { 1 -> Invited 2 -> Accepted else -> Unknown(value) } } - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Use 'TeamMembershipState.serializer()' instead.", - replaceWith = ReplaceWith(expression = "TeamMembershipState.serializer()", imports = - arrayOf("dev.kord.common.entity.TeamMembershipState")), - ) - public object TeamMembershipStateSerializer : KSerializer by Serializer { - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Use 'TeamMembershipState.serializer()' instead.", - replaceWith = ReplaceWith(expression = "TeamMembershipState.serializer()", imports = - arrayOf("dev.kord.common.entity.TeamMembershipState")), - ) - public fun serializer(): KSerializer = this - } - public companion object { /** * A [List] of all known [TeamMembershipState]s. @@ -97,14 +73,5 @@ public sealed class TeamMembershipState( ) } - - @Suppress(names = arrayOf("DEPRECATION_ERROR")) - @Deprecated( - level = DeprecationLevel.HIDDEN, - message = "Binary compatibility", - ) - @JvmField - public val TeamMembershipStateSerializer: TeamMembershipStateSerializer = - TeamMembershipStateSerializer } } diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/TextInputStyle.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/TextInputStyle.kt index 2755562695bd..35f67d4dfb14 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/TextInputStyle.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/TextInputStyle.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -32,13 +26,12 @@ public sealed class TextInputStyle( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is TextInputStyle && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "TextInputStyle.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "TextInputStyle.${this::class.simpleName}(value=$value)" /** * An unknown [TextInputStyle]. @@ -60,14 +53,16 @@ public sealed class TextInputStyle( public object Paragraph : TextInputStyle(2) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.TextInputStyle", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: TextInputStyle) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: TextInputStyle) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): TextInputStyle = + when (val value = decoder.decodeInt()) { 1 -> Short 2 -> Paragraph else -> Unknown(value) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/UserPremium.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/UserPremium.kt index 9c922410ce00..49f25c2e6f96 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/UserPremium.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/UserPremium.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -32,13 +26,12 @@ public sealed class UserPremium( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is UserPremium && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "UserPremium.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "UserPremium.${this::class.simpleName}(value=$value)" /** * An unknown [UserPremium]. @@ -58,13 +51,15 @@ public sealed class UserPremium( public object NitroBasic : UserPremium(3) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.UserPremium", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: UserPremium) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: UserPremium) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): UserPremium = + when (val value = decoder.decodeInt()) { 0 -> None 1 -> NitroClassic 2 -> Nitro diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/VerificationLevel.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/VerificationLevel.kt index 174f9a6c3942..aebbf730d515 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/VerificationLevel.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/VerificationLevel.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class VerificationLevel( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is VerificationLevel && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "VerificationLevel.${this::class.simpleName}(value=$value)" /** @@ -73,14 +67,16 @@ public sealed class VerificationLevel( public object VeryHigh : VerificationLevel(4) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.VerificationLevel", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: VerificationLevel) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: VerificationLevel) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): VerificationLevel = + when (val value = decoder.decodeInt()) { 0 -> None 1 -> Low 2 -> Medium diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/VideoQualityMode.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/VideoQualityMode.kt index 22c92b3ae03c..b120af87b942 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/VideoQualityMode.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/VideoQualityMode.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,12 +24,12 @@ public sealed class VideoQualityMode( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is VideoQualityMode && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = + final override fun toString(): String = "VideoQualityMode.${this::class.simpleName}(value=$value)" /** @@ -58,14 +52,16 @@ public sealed class VideoQualityMode( public object Full : VideoQualityMode(2) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.VideoQualityMode", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: VideoQualityMode) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: VideoQualityMode) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): VideoQualityMode = + when (val value = decoder.decodeInt()) { 1 -> Auto 2 -> Full else -> Unknown(value) diff --git a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/WebhookType.kt b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/WebhookType.kt index 5a2509adc670..ad723e7c4873 100644 --- a/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/WebhookType.kt +++ b/common/build/generated/ksp/metadata/commonMain/kotlin/dev/kord/common/entity/WebhookType.kt @@ -1,16 +1,10 @@ -// THIS FILE IS AUTO-GENERATED BY KordEnumProcessor.kt, DO NOT EDIT! +// THIS FILE IS AUTO-GENERATED, DO NOT EDIT! @file:Suppress(names = arrayOf("RedundantVisibilityModifier", "IncorrectFormatting", "ReplaceArrayOfWithLiteral", "SpellCheckingInspection", "GrazieInspection")) package dev.kord.common.entity -import kotlin.Any -import kotlin.Boolean -import kotlin.Int import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.String -import kotlin.Suppress -import kotlin.collections.List import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -30,13 +24,12 @@ public sealed class WebhookType( */ public val `value`: Int, ) { - public final override fun equals(other: Any?): Boolean = this === other || + final override fun equals(other: Any?): Boolean = this === other || (other is WebhookType && this.value == other.value) - public final override fun hashCode(): Int = value.hashCode() + final override fun hashCode(): Int = value.hashCode() - public final override fun toString(): String = - "WebhookType.${this::class.simpleName}(value=$value)" + final override fun toString(): String = "WebhookType.${this::class.simpleName}(value=$value)" /** * An unknown [WebhookType]. @@ -64,13 +57,15 @@ public sealed class WebhookType( public object Application : WebhookType(3) internal object Serializer : KSerializer { - public override val descriptor: SerialDescriptor = + override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.WebhookType", PrimitiveKind.INT) - public override fun serialize(encoder: Encoder, `value`: WebhookType) = - encoder.encodeInt(value.value) + override fun serialize(encoder: Encoder, `value`: WebhookType) { + encoder.encodeInt(value.value) + } - public override fun deserialize(decoder: Decoder) = when (val value = decoder.decodeInt()) { + override fun deserialize(decoder: Decoder): WebhookType = + when (val value = decoder.decodeInt()) { 1 -> Incoming 2 -> ChannelFollower 3 -> Application diff --git a/common/src/commonMain/kotlin/DiscordBitSet.kt b/common/src/commonMain/kotlin/DiscordBitSet.kt index 8098026c4701..48fd6f492863 100644 --- a/common/src/commonMain/kotlin/DiscordBitSet.kt +++ b/common/src/commonMain/kotlin/DiscordBitSet.kt @@ -40,7 +40,7 @@ public class DiscordBitSet(internal var data: LongArray) { // data is in little- override fun equals(other: Any?): Boolean { if (other !is DiscordBitSet) return false // trailing zeros are ignored -> getOrZero - for (i in 0 until max(this.data.size, other.data.size)) { + for (i in 0..> = Optional.Missing(), + val description: String, + @SerialName("description_localizations") + val descriptionLocalizations: Optional> = Optional.Missing(), +) diff --git a/common/src/commonMain/kotlin/entity/AuditLog.kt b/common/src/commonMain/kotlin/entity/AuditLog.kt index dce82c8c9751..1faa5f383aa1 100644 --- a/common/src/commonMain/kotlin/entity/AuditLog.kt +++ b/common/src/commonMain/kotlin/entity/AuditLog.kt @@ -182,7 +182,7 @@ public data class AuditLogChange( val key: AuditLogChangeKey, ) { - internal class Serializer(val ser: KSerializer) : KSerializer> { + internal class Serializer(private val ser: KSerializer) : KSerializer> { override val descriptor: SerialDescriptor = buildClassSerialDescriptor("Kord.AuditLogChange", ser.descriptor) { element("new_value") element("old_value") diff --git a/common/src/commonMain/kotlin/entity/AutoModeration.kt b/common/src/commonMain/kotlin/entity/AutoModeration.kt index fa0b31ca442f..e7b3f7c504b2 100644 --- a/common/src/commonMain/kotlin/entity/AutoModeration.kt +++ b/common/src/commonMain/kotlin/entity/AutoModeration.kt @@ -58,6 +58,7 @@ package dev.kord.common.entity import dev.kord.common.entity.optional.Optional +import dev.kord.common.entity.optional.OptionalBoolean import dev.kord.common.entity.optional.OptionalInt import dev.kord.common.entity.optional.OptionalSnowflake import dev.kord.common.serialization.DurationInSeconds @@ -100,6 +101,8 @@ public data class DiscordAutoModerationRuleTriggerMetadata( val allowList: Optional> = Optional.Missing(), @SerialName("mention_total_limit") val mentionTotalLimit: OptionalInt = OptionalInt.Missing, + @SerialName("mention_raid_protection_enabled") + val mentionRaidProtectionEnabled: OptionalBoolean = OptionalBoolean.Missing, ) @Serializable diff --git a/common/src/commonMain/kotlin/entity/Data.kt b/common/src/commonMain/kotlin/entity/Data.kt index ecc140730ba5..19c3e8d2d7c5 100644 --- a/common/src/commonMain/kotlin/entity/Data.kt +++ b/common/src/commonMain/kotlin/entity/Data.kt @@ -2,7 +2,7 @@ package dev.kord.common.entity import dev.kord.common.entity.optional.Optional import dev.kord.common.entity.optional.OptionalSnowflake -import dev.kord.common.serialization.InstantInEpochSecondsSerializer +import dev.kord.common.serialization.InstantInEpochSeconds import kotlinx.datetime.Instant import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @@ -25,7 +25,6 @@ public data class DiscordTyping( val guildId: OptionalSnowflake = OptionalSnowflake.Missing, @SerialName("user_id") val userId: Snowflake, - @Serializable(with = InstantInEpochSecondsSerializer::class) - val timestamp: Instant, + val timestamp: InstantInEpochSeconds, val member: Optional = Optional.Missing() ) diff --git a/common/src/commonMain/kotlin/entity/DiscordActivity.kt b/common/src/commonMain/kotlin/entity/DiscordActivity.kt index dd1dd521d966..b233edc206f3 100644 --- a/common/src/commonMain/kotlin/entity/DiscordActivity.kt +++ b/common/src/commonMain/kotlin/entity/DiscordActivity.kt @@ -1,20 +1,31 @@ +@file:GenerateKordEnum( + name = "ActivityType", valueType = INT, valueName = "code", + docUrl = "https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types", + entries = [ + Entry("Game", intValue = 0), + Entry("Streaming", intValue = 1), + Entry("Listening", intValue = 2), + Entry("Watching", intValue = 3), + Entry("Custom", intValue = 4), + Entry("Competing", intValue = 5), + ], +) + package dev.kord.common.entity import dev.kord.common.entity.optional.Optional import dev.kord.common.entity.optional.OptionalBoolean import dev.kord.common.entity.optional.OptionalSnowflake -import dev.kord.common.serialization.InstantInEpochMillisecondsSerializer -import kotlinx.datetime.Instant +import dev.kord.common.serialization.InstantInEpochMilliseconds +import dev.kord.ksp.GenerateKordEnum +import dev.kord.ksp.GenerateKordEnum.Entry +import dev.kord.ksp.GenerateKordEnum.ValueType.INT import kotlinx.serialization.* import kotlinx.serialization.builtins.ListSerializer import kotlinx.serialization.builtins.serializer import kotlinx.serialization.descriptors.* import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder -import kotlin.DeprecationLevel.HIDDEN -import kotlin.LazyThreadSafetyMode.PUBLICATION -import kotlin.jvm.JvmField -import kotlin.jvm.JvmStatic @Serializable public data class DiscordBotActivity( @@ -29,8 +40,7 @@ public data class DiscordActivity( val type: ActivityType, val url: Optional = Optional.Missing(), @SerialName("created_at") - @Serializable(with = InstantInEpochMillisecondsSerializer::class) - val createdAt: Instant, + val createdAt: InstantInEpochMilliseconds, val timestamps: Optional = Optional.Missing(), @SerialName("application_id") val applicationId: OptionalSnowflake = OptionalSnowflake.Missing, @@ -76,8 +86,8 @@ public class ActivityFlags(public val value: Int) { @Serializable public data class DiscordActivityTimestamps( - val start: Optional<@Serializable(with = InstantInEpochMillisecondsSerializer::class) Instant> = Optional.Missing(), - val end: Optional<@Serializable(with = InstantInEpochMillisecondsSerializer::class) Instant> = Optional.Missing(), + val start: Optional = Optional.Missing(), + val end: Optional = Optional.Missing(), ) @Serializable @@ -134,116 +144,3 @@ public data class DiscordActivitySecrets( val spectate: Optional = Optional.Missing(), val match: Optional = Optional.Missing() ) - - -// TODO replace with the following annotation once the deprecation cycle for enum artifacts is done -// @file:GenerateKordEnum( -// name = "ActivityType", valueType = INT, valueName = "code", -// deprecatedSerializerName = "ActivityTypeSerializer", -// docUrl = "https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types", -// entries = [ -// Entry("Game", intValue = 0), -// Entry("Streaming", intValue = 1), -// Entry("Listening", intValue = 2), -// Entry("Watching", intValue = 3), -// Entry("Custom", intValue = 4), -// Entry("Competing", intValue = 5), -// ], -// ) -@Serializable(with = ActivityType.Serializer::class) -public sealed class ActivityType(public val code: Int) { - final override fun equals(other: Any?): Boolean = - this === other || (other is ActivityType && this.code == other.code) - - final override fun hashCode(): Int = code.hashCode() - final override fun toString(): String = "ActivityType.${this::class.simpleName}(code=$code)" - - public class Unknown(code: Int) : ActivityType(code) - public object Game : ActivityType(0) - public object Streaming : ActivityType(1) - public object Listening : ActivityType(2) - public object Watching : ActivityType(3) - public object Custom : ActivityType(4) - public object Competing : ActivityType(5) - - internal object Serializer : KSerializer { - override val descriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.ActivityType", PrimitiveKind.INT) - override fun serialize(encoder: Encoder, value: ActivityType) = encoder.encodeInt(value.code) - override fun deserialize(decoder: Decoder) = when (val code = decoder.decodeInt()) { - 0 -> Game - 1 -> Streaming - 2 -> Listening - 3 -> Watching - 4 -> Custom - 5 -> Competing - else -> Unknown(code) - } - } - - public companion object { - public val entries: List by lazy(mode = PUBLICATION) { - listOf(Game, Streaming, Listening, Watching, Custom, Competing) - } - - - // enum artifacts - - private val UNKNOWN = Unknown(Int.MIN_VALUE) // like old enum entry `Unknown` - - // @formatter:off - @Deprecated("Binary compatibility", level = HIDDEN) @JvmField public val Unknown: ActivityType = UNKNOWN - @Deprecated("Binary compatibility", level = HIDDEN) @JvmField public val Game: ActivityType = Game - @Deprecated("Binary compatibility", level = HIDDEN) @JvmField public val Streaming: ActivityType = Streaming - @Deprecated("Binary compatibility", level = HIDDEN) @JvmField public val Listening: ActivityType = Listening - @Deprecated("Binary compatibility", level = HIDDEN) @JvmField public val Watching: ActivityType = Watching - @Deprecated("Binary compatibility", level = HIDDEN) @JvmField public val Custom: ActivityType = Custom - @Deprecated("Binary compatibility", level = HIDDEN) @JvmField public val Competing: ActivityType = Competing - // @formatter:on - - /** @suppress */ - @Suppress("NON_FINAL_MEMBER_IN_OBJECT") - @Deprecated("ActivityType is no longer an enum class. Deprecated without replacement.", level = HIDDEN) - @JvmStatic - public open fun valueOf(name: String): ActivityType = when (name) { - "Unknown" -> UNKNOWN - "Game" -> Game - "Streaming" -> Streaming - "Listening" -> Listening - "Watching" -> Watching - "Custom" -> Custom - "Competing" -> Competing - else -> throw IllegalArgumentException(name) - } - - /** @suppress */ - @Suppress("NON_FINAL_MEMBER_IN_OBJECT") - @Deprecated( - "ActivityType is no longer an enum class.", - ReplaceWith("ActivityType.entries.toTypedArray()", "dev.kord.common.entity.ActivityType"), - level = HIDDEN, - ) - @JvmStatic - public open fun values(): Array = - arrayOf(UNKNOWN, Game, Streaming, Listening, Watching, Custom, Competing) - - - @Suppress("DEPRECATION_ERROR") - @Deprecated("Binary compatibility", level = HIDDEN) - @JvmField - public val ActivityTypeSerializer: ActivityTypeSerializer = ActivityTypeSerializer - } - - @Deprecated( - "Use 'ActivityType.serializer()' instead.", - ReplaceWith("ActivityType.serializer()", "dev.kord.common.entity.ActivityType"), - level = HIDDEN, - ) - public object ActivityTypeSerializer : KSerializer by Serializer { - @Deprecated( - "Use 'ActivityType.serializer()' instead.", - ReplaceWith("ActivityType.serializer()", "dev.kord.common.entity.ActivityType"), - level = HIDDEN, - ) - public fun serializer(): KSerializer = this - } -} diff --git a/common/src/commonMain/kotlin/entity/DiscordApplication.kt b/common/src/commonMain/kotlin/entity/DiscordApplication.kt index 64bb61152132..2d56619aa089 100644 --- a/common/src/commonMain/kotlin/entity/DiscordApplication.kt +++ b/common/src/commonMain/kotlin/entity/DiscordApplication.kt @@ -32,6 +32,7 @@ public sealed interface BaseDiscordApplication { public val tags: Optional> public val installParams: Optional public val customInstallUrl: Optional + public val roleConnectionsVerificationUrl: Optional } /** @@ -71,6 +72,8 @@ public data class DiscordApplication( override val installParams: Optional = Optional.Missing(), @SerialName("custom_install_url") override val customInstallUrl: Optional = Optional.Missing(), + @SerialName("role_connections_verification_url") + override val roleConnectionsVerificationUrl: Optional = Optional.Missing(), ) : BaseDiscordApplication /** @@ -106,6 +109,8 @@ public data class DiscordPartialApplication( override val installParams: Optional = Optional.Missing(), @SerialName("custom_install_url") override val customInstallUrl: Optional = Optional.Missing(), + @SerialName("role_connections_verification_url") + override val roleConnectionsVerificationUrl: Optional = Optional.Missing(), ) : BaseDiscordApplication public enum class ApplicationFlag(public val code: Int) { @@ -113,33 +118,29 @@ public enum class ApplicationFlag(public val code: Int) { /** Indicates if an app uses the Auto Moderation API. */ ApplicationAutoModerationRuleCreateBadge(1 shl 6), - /** - * Intent required for bots in **100 or more servers** to receive - * [`PresenceUpdate` events](https://discord.com/developers/docs/topics/gateway#presence-update). - */ + /** Intent required for bots in **100 or more servers** to receive `PresenceUpdate` events. */ GatewayPresence(1 shl 12), /** - * Intent required for bots in under 100 servers to receive - * [`PresenceUpdate` events](https://discord.com/developers/docs/topics/gateway#presence-update), found in Bot - * Settings. + * Intent required for bots in under 100 servers to receive `PresenceUpdate` events, found on the **Bot** page in + * your app's settings. */ GatewayPresenceLimited(1 shl 13), /** * Intent required for bots in **100 or more servers** to receive member-related events like `GuildMemberAdd`. * - * See list of member-related events under - * [`GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents). + * See the list of member-related events + * [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents). */ GatewayGuildMembers(1 shl 14), /** - * Intent required for bots in under 100 servers to receive member-related events like `GuildMemberAdd`, found in - * Bot Settings. + * Intent required for bots in under 100 servers to receive member-related events like `GuildMemberAdd`, found on + * the **Bot** page in your app's settings. * - * See list of member-related events under - * [`GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents). + * See the list of member-related events + * [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents). */ GatewayGuildMembersLimited(1 shl 15), @@ -157,7 +158,8 @@ public enum class ApplicationFlag(public val code: Int) { /** * Intent required for bots in under 100 servers to receive - * [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055), found in Bot Settings. + * [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055), found on the **Bot** page in + * your app's settings. */ GatewayMessageContentLimited(1 shl 19), diff --git a/common/src/commonMain/kotlin/entity/DiscordChannel.kt b/common/src/commonMain/kotlin/entity/DiscordChannel.kt index cebfee562112..118b78a0eb0b 100644 --- a/common/src/commonMain/kotlin/entity/DiscordChannel.kt +++ b/common/src/commonMain/kotlin/entity/DiscordChannel.kt @@ -95,7 +95,6 @@ import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor import kotlinx.serialization.descriptors.SerialDescriptor import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder -import kotlin.DeprecationLevel.HIDDEN import kotlin.LazyThreadSafetyMode.PUBLICATION import kotlin.contracts.InvocationKind import kotlin.contracts.contract @@ -279,7 +278,7 @@ public data class DiscordThreadMetadata( // this should actually be generated with @file:GenerateKordEnum, // but it's not worth adding support for Duration just for this class -@Serializable(with = ArchiveDuration.NewSerializer::class) +@Serializable(with = ArchiveDuration.Serializer::class) public sealed class ArchiveDuration( /** The raw [Duration] used by Discord. */ public val duration: Duration, @@ -301,7 +300,7 @@ public sealed class ArchiveDuration( public object ThreeDays : ArchiveDuration(4320.minutes) public object Week : ArchiveDuration(10080.minutes) - internal object NewSerializer : KSerializer { + internal object Serializer : KSerializer { override val descriptor get() = DurationInMinutesSerializer.descriptor override fun serialize(encoder: Encoder, value: ArchiveDuration) = @@ -318,18 +317,7 @@ public sealed class ArchiveDuration( public val entries: List by lazy(mode = PUBLICATION) { listOf(Hour, Day, ThreeDays, Week) } - - @Deprecated("Renamed to 'entries'.", ReplaceWith("this.entries"), level = HIDDEN) - public val values: Set get() = entries.toSet() } - - @Deprecated( - "Use 'ArchiveDuration.serializer()' instead.", - ReplaceWith("ArchiveDuration.serializer()", "dev.kord.common.entity.ArchiveDuration"), - level = HIDDEN, - ) - // TODO rename internal `NewSerializer` to `Serializer` when this is removed - public object Serializer : KSerializer by NewSerializer } @Serializable diff --git a/common/src/commonMain/kotlin/entity/DiscordComponent.kt b/common/src/commonMain/kotlin/entity/DiscordComponent.kt index 0c12f10a0097..0aa3813f5f5d 100644 --- a/common/src/commonMain/kotlin/entity/DiscordComponent.kt +++ b/common/src/commonMain/kotlin/entity/DiscordComponent.kt @@ -1,6 +1,5 @@ @file:GenerateKordEnum( name = "ComponentType", valueType = INT, - deprecatedSerializerName = "Serializer", docUrl = "https://discord.com/developers/docs/interactions/message-components#component-object-component-types", entries = [ Entry("ActionRow", intValue = 1, kDoc = "A container for other components."), @@ -12,17 +11,10 @@ Entry("MentionableSelect", intValue = 7, kDoc = "Select menu for mentionables (users and roles)."), Entry("ChannelSelect", intValue = 8, kDoc = "Select menu for channels."), ], - deprecatedEntries = [ - Entry("SelectMenu", intValue = 3, kDoc = "A select menu for picking from choices.", - deprecationMessage = "Renamed by discord", replaceWith = ReplaceWith("StringSelect", "dev.kord.common.entity.ComponentType.StringSelect"), - deprecationLevel = DeprecationLevel.ERROR - ), - ], ) @file:GenerateKordEnum( name = "ButtonStyle", valueType = INT, - deprecatedSerializerName = "Serializer", kDoc = "Style of a [button][dev.kord.common.entity.ComponentType.Button].", docUrl = "https://discord.com/developers/docs/interactions/message-components#button-object-button-styles", entries = [ @@ -61,7 +53,6 @@ import kotlinx.serialization.json.* * Represent a [interactable component within a message sent in Discord](https://discord.com/developers/docs/interactions/message-components#what-are-components). * * @property type the [ComponentType] of the component - * @property style the [ButtonStyle] of the component (if it is a button) * @property emoji an [DiscordPartialEmoji] that appears on the button (if the component is a button) * @property customId a developer-defined identifier for the button, max 100 characters * @property url a url for link-style buttons @@ -106,9 +97,10 @@ public sealed class DiscordComponent { override fun selectDeserializer(element: JsonElement): KSerializer { val componentType = element.jsonObject["type"]?.jsonPrimitive?.intOrNull ?: error("Missing component type ID!") - return when (componentType) { - ComponentType.TextInput.value -> DiscordTextInputComponent.serializer() - else -> DiscordChatComponent.serializer() + return if (componentType == ComponentType.TextInput.value) { + DiscordTextInputComponent.serializer() + } else { + DiscordChatComponent.serializer() } } } diff --git a/common/src/commonMain/kotlin/entity/DiscordGuild.kt b/common/src/commonMain/kotlin/entity/DiscordGuild.kt index 6827d1998ab2..53589d6b425c 100644 --- a/common/src/commonMain/kotlin/entity/DiscordGuild.kt +++ b/common/src/commonMain/kotlin/entity/DiscordGuild.kt @@ -122,6 +122,10 @@ "PreviewEnabled", stringValue = "PREVIEW_ENABLED", kDoc = "Guild can be previewed before joining via Membership Screening or the directory.", ), + Entry( + "RaidAlertsDisabled", stringValue = "RAID_ALERTS_DISABLED", + kDoc = "Guild has disabled alerts for join raids in the configured safety alerts channel.", + ), Entry("RoleIcons", stringValue = "ROLE_ICONS", kDoc = "Guild is able to set role icons."), Entry("RoleSubscriptionsAvailableForPurchase", stringValue = "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE", kDoc = "Guild has role subscriptions that can be purchased." @@ -144,21 +148,6 @@ kDoc = "Guild has enabled the welcome screen.", ), ], - deprecatedEntries = [ - Entry( - "MonetizationEnabled", stringValue = "MONETIZATION_ENABLED", kDoc = "Guild has enabled monetization.", - deprecationMessage = "Replaced by CreatorMonetizableProvisional.", deprecationLevel = ERROR, - replaceWith = ReplaceWith( - "GuildFeature.CreatorMonetizableProvisional", - imports = ["dev.kord.common.entitiy.GuildFeature"], - ), - ), - Entry( - "PrivateThreads", stringValue = "PRIVATE_THREADS", kDoc = "Guild has access to create private threads", - deprecationMessage = "Creating a private thread no longer requires the server to be boosted.", - deprecationLevel = ERROR, - ), - ], ) package dev.kord.common.entity @@ -181,7 +170,6 @@ import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor import kotlinx.serialization.descriptors.SerialDescriptor import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder -import kotlin.DeprecationLevel.ERROR /** * A partial representation of a [DiscordGuild] that may be [unavailable]. @@ -307,7 +295,9 @@ public data class DiscordGuild( @SerialName("guild_scheduled_events") val guildScheduledEvents: Optional> = Optional.Missing(), @SerialName("premium_progress_bar_enabled") - val premiumProgressBarEnabled: Boolean + val premiumProgressBarEnabled: Boolean, + @SerialName("safety_alerts_channel_id") + val safetyAlertsChannelId: Snowflake?, ) /** diff --git a/common/src/commonMain/kotlin/entity/DiscordGuildScheduledEvent.kt b/common/src/commonMain/kotlin/entity/DiscordGuildScheduledEvent.kt index d48210092d94..841a05179d18 100644 --- a/common/src/commonMain/kotlin/entity/DiscordGuildScheduledEvent.kt +++ b/common/src/commonMain/kotlin/entity/DiscordGuildScheduledEvent.kt @@ -6,7 +6,6 @@ @file:GenerateKordEnum( name = "ScheduledEntityType", valueType = INT, - deprecatedSerializerName = "Serializer", docUrl = "https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types", entries = [ Entry("StageInstance", intValue = 1), @@ -17,7 +16,6 @@ @file:GenerateKordEnum( name = "GuildScheduledEventStatus", valueType = INT, - deprecatedSerializerName = "Serializer", docUrl = "https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status", entries = [ Entry("Scheduled", intValue = 1), diff --git a/common/src/commonMain/kotlin/entity/DiscordIntegration.kt b/common/src/commonMain/kotlin/entity/DiscordIntegration.kt index c85a60ed87e9..3e0bad9658a8 100644 --- a/common/src/commonMain/kotlin/entity/DiscordIntegration.kt +++ b/common/src/commonMain/kotlin/entity/DiscordIntegration.kt @@ -1,6 +1,5 @@ @file:GenerateKordEnum( name = "IntegrationExpireBehavior", valueType = INT, - deprecatedSerializerName = "Serializer", docUrl = "https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors", entries = [ Entry("RemoveRole", intValue = 0), diff --git a/common/src/commonMain/kotlin/entity/DiscordMessage.kt b/common/src/commonMain/kotlin/entity/DiscordMessage.kt index 263a79c080ab..41b613b7451a 100644 --- a/common/src/commonMain/kotlin/entity/DiscordMessage.kt +++ b/common/src/commonMain/kotlin/entity/DiscordMessage.kt @@ -1,7 +1,5 @@ @file:GenerateKordEnum( name = "MessageType", valueType = INT, valueName = "code", - // had `public val values: Set` in companion before -> replace with `entries` - valuesPropertyName = "values", valuesPropertyType = SET, docUrl = "https://discord.com/developers/docs/resources/channel#message-object-message-types", entries = [ Entry("Default", intValue = 0), @@ -74,8 +72,6 @@ @file:GenerateKordEnum( name = "MessageStickerType", valueType = INT, - // had `public val values: Set` in companion before -> replace with `entries` - valuesPropertyName = "values", valuesPropertyType = SET, docUrl = "https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types", entries = [ Entry("PNG", intValue = 1), @@ -91,12 +87,12 @@ import dev.kord.common.entity.optional.Optional import dev.kord.common.entity.optional.OptionalBoolean import dev.kord.common.entity.optional.OptionalInt import dev.kord.common.entity.optional.OptionalSnowflake +import dev.kord.common.serialization.DurationInDoubleSeconds import dev.kord.common.serialization.LongOrStringSerializer import dev.kord.ksp.GenerateKordEnum import dev.kord.ksp.GenerateKordEnum.Entry import dev.kord.ksp.GenerateKordEnum.ValueType.INT import dev.kord.ksp.GenerateKordEnum.ValueType.STRING -import dev.kord.ksp.GenerateKordEnum.ValuesPropertyType.SET import kotlinx.datetime.Instant import kotlinx.serialization.KSerializer import kotlinx.serialization.SerialName @@ -406,7 +402,12 @@ public enum class MessageFlag(public val code: Int) { FailedToMentionSomeRolesInThread(1 shl 8), /** This message will not trigger push and desktop notifications. */ - SuppressNotifications(1 shl 12) + SuppressNotifications(1 shl 12), + + /** + * This message is a voice message. + */ + IsVoiceMessage(1 shl 13) } @Serializable(with = MessageFlags.Serializer::class) @@ -502,15 +503,18 @@ public fun MessageFlags(flags: Iterable): MessageFlags = MessageFl /** * A representation of a [Discord Attachment structure](https://discord.com/developers/docs/resources/channel#attachment-object). * - * @param id The attachment id. - * @param filename The name of the attached file. - * @param description The description for the file. - * @param contentType The attachment's [media type](https://en.wikipedia.org/wiki/Media_type). - * @param size The size of the file in bytes. - * @param url The source url of the file. - * @param proxyUrl A proxied url of the field. - * @param height The height of the file (if it is an image). - * @param width The width of the file (if it is an image). + * @property id The attachment id. + * @property filename The name of the attached file. + * @property description The description for the file. + * @property contentType The attachment's [media type](https://en.wikipedia.org/wiki/Media_type). + * @property size The size of the file in bytes. + * @property url The source url of the file. + * @property proxyUrl A proxied url of the field. + * @property height The height of the file (if it is an image). + * @property width The width of the file (if it is an image). + * @property ephemeral Whether this attachment is ephemeral + * @property durationSecs The duration of the audio file (currently for voice messages) + * @property waveform Base64 encoded bytearray representing a sampled waveform (currently for voice messages) */ @Serializable public data class DiscordAttachment( @@ -534,7 +538,10 @@ public data class DiscordAttachment( */ val width: OptionalInt? = OptionalInt.Missing, - val ephemeral: OptionalBoolean = OptionalBoolean.Missing + val ephemeral: OptionalBoolean = OptionalBoolean.Missing, + @SerialName("duration_secs") + val durationSecs: Optional = Optional.Missing(), + val waveform: Optional = Optional.Missing() ) /** @@ -658,7 +665,7 @@ public data class DiscordEmbed( @Serializable public data class Author( val name: Optional = Optional.Missing(), - val url: Optional = Optional.Missing(), + val url: Optional = Optional.Missing(), // see https://github.com/kordlib/kord/issues/838 @SerialName("icon_url") val iconUrl: Optional = Optional.Missing(), @SerialName("proxy_icon_url") diff --git a/common/src/commonMain/kotlin/entity/DiscordNull.kt b/common/src/commonMain/kotlin/entity/DiscordNull.kt deleted file mode 100644 index 0d7dee51538f..000000000000 --- a/common/src/commonMain/kotlin/entity/DiscordNull.kt +++ /dev/null @@ -1,40 +0,0 @@ -package dev.kord.common.entity - -import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializable -import kotlinx.serialization.SerializationException -import kotlinx.serialization.descriptors.SerialDescriptor -import kotlinx.serialization.descriptors.buildClassSerialDescriptor -import kotlinx.serialization.encoding.Decoder -import kotlinx.serialization.encoding.Encoder -import kotlin.DeprecationLevel.ERROR - -/** - * Type to represent a Discord value that can only be null. This class cannot be instantiated. - */ -@Suppress("DEPRECATION_ERROR") -@Deprecated( - "This class is similar to 'Nothing' as it has no instances. The only reason it existed was to have a " + - "@Serializable version of 'Nothing'. However, since Kotlin 1.8.0 and kotlinx.serialization 1.5.0-RC " + - "'Nothing' is a serializable class. This means 'DiscordNull' isn't needed anymore and should be replaced " + - "with 'Nothing'.", - ReplaceWith("Nothing", imports = ["kotlin.Nothing"]), - level = ERROR, -) -@Serializable(with = DiscordNull.Serializer::class) -public class DiscordNull private constructor() { - - internal object Serializer : KSerializer { - - override val descriptor: SerialDescriptor - get() = buildClassSerialDescriptor("Kord.DiscordNull") - - override fun deserialize(decoder: Decoder): DiscordNull { - throw SerializationException("DiscordNull cannot have an instance.") - } - - override fun serialize(encoder: Encoder, value: DiscordNull) { - throw SerializationException("DiscordNull cannot be encoded.") - } - } -} diff --git a/common/src/commonMain/kotlin/entity/DiscordStageInstance.kt b/common/src/commonMain/kotlin/entity/DiscordStageInstance.kt index 4f1562659a34..29c504ee26a0 100644 --- a/common/src/commonMain/kotlin/entity/DiscordStageInstance.kt +++ b/common/src/commonMain/kotlin/entity/DiscordStageInstance.kt @@ -1,15 +1,12 @@ @file:GenerateKordEnum( name = "StageInstancePrivacyLevel", valueType = INT, - deprecatedSerializerName = "Serializer", docUrl = "https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level", entries = [ - Entry("GuildOnly", intValue = 2, kDoc = "The Stage instance is visible to only guild members."), - ], - deprecatedEntries = [ Entry( "Public", intValue = 1, kDoc = "The Stage instance is visible publicly.", - deprecationMessage = "Stages are no longer discoverable", deprecationLevel = WARNING, + deprecated = Deprecated("Stages are no longer discoverable", level = WARNING), ), + Entry("GuildOnly", intValue = 2, kDoc = "The Stage instance is visible to only guild members."), ], ) diff --git a/common/src/commonMain/kotlin/entity/DiscordUser.kt b/common/src/commonMain/kotlin/entity/DiscordUser.kt index 94a05da66fb8..8b72099c347a 100644 --- a/common/src/commonMain/kotlin/entity/DiscordUser.kt +++ b/common/src/commonMain/kotlin/entity/DiscordUser.kt @@ -27,6 +27,7 @@ import kotlinx.serialization.descriptors.SerialDescriptor import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.json.JsonNames +import kotlin.DeprecationLevel.WARNING import kotlin.contracts.InvocationKind import kotlin.contracts.contract @@ -51,7 +52,14 @@ import kotlin.contracts.contract public data class DiscordUser( val id: Snowflake, val username: String, - val discriminator: String, + @Deprecated( + "Discord's username system is changing and discriminators are being removed, see " + + "https://discord.com/developers/docs/change-log#unique-usernames-on-discord for details.", + level = WARNING, + ) + val discriminator: Optional = Optional.Missing(), + @SerialName("global_name") + val globalName: Optional = Optional.Missing(), val avatar: String?, val bot: OptionalBoolean = OptionalBoolean.Missing, val system: OptionalBoolean = OptionalBoolean.Missing, @@ -92,7 +100,14 @@ public data class DiscordUser( public data class DiscordOptionallyMemberUser( val id: Snowflake, val username: String, - val discriminator: String, + @Deprecated( + "Discord's username system is changing and discriminators are being removed, see " + + "https://discord.com/developers/docs/change-log#unique-usernames-on-discord for details.", + level = WARNING, + ) + val discriminator: Optional = Optional.Missing(), + @SerialName("global_name") + val globalName: Optional = Optional.Missing(), val avatar: String?, val bot: OptionalBoolean = OptionalBoolean.Missing, val system: OptionalBoolean = OptionalBoolean.Missing, @@ -138,15 +153,11 @@ public data class UserFlags(val code: Int) { public operator fun contains(flag: UserFlag): Boolean = flag in flags - public operator fun plus(flags: UserFlags): UserFlags = when { - code and flags.code == flags.code -> this - else -> UserFlags(this.code or flags.code) - } + public operator fun plus(flags: UserFlags): UserFlags = + if (code and flags.code == flags.code) this else UserFlags(this.code or flags.code) - public operator fun minus(flag: UserFlag): UserFlags = when { - code and flag.code == flag.code -> UserFlags(code xor flag.code) - else -> this - } + public operator fun minus(flag: UserFlag): UserFlags = + if (code and flag.code == flag.code) UserFlags(code xor flag.code) else this public inline fun copy(block: UserFlagsBuilder.() -> Unit): UserFlags { contract { diff --git a/common/src/commonMain/kotlin/entity/Interactions.kt b/common/src/commonMain/kotlin/entity/Interactions.kt index 21fab94936ee..0f8afecc4615 100644 --- a/common/src/commonMain/kotlin/entity/Interactions.kt +++ b/common/src/commonMain/kotlin/entity/Interactions.kt @@ -91,7 +91,6 @@ import kotlinx.serialization.builtins.serializer import kotlinx.serialization.descriptors.* import kotlinx.serialization.encoding.* import kotlinx.serialization.json.* -import kotlin.DeprecationLevel.ERROR @Serializable public data class DiscordApplicationCommand( @@ -172,18 +171,6 @@ public sealed class Choice { public abstract val nameLocalizations: Optional?> public abstract val value: T - @Deprecated("Renamed to 'IntegerChoice'.", level = ERROR) - public data class IntChoice - @Deprecated( - "Renamed to 'IntegerChoice'.", - ReplaceWith("IntegerChoice(name, nameLocalizations, value)", "dev.kord.common.entity.Choice.IntegerChoice"), - level = ERROR, - ) public constructor( - override val name: String, - override val nameLocalizations: Optional?>, - override val value: Long - ) : Choice() - public data class IntegerChoice( override val name: String, override val nameLocalizations: Optional?>, @@ -240,7 +227,6 @@ public sealed class Choice { encodeStringElement(descriptor, 0, value.name) when (value) { - is @Suppress("DEPRECATION_ERROR") IntChoice -> encodeLongElement(descriptor, 1, value.value) is IntegerChoice -> encodeLongElement(descriptor, 1, value.value) is NumberChoice -> encodeDoubleElement(descriptor, 1, value.value) is StringChoice -> encodeStringElement(descriptor, 1, value.value) @@ -695,47 +681,6 @@ public data class CommandGroup( get() = ApplicationCommandOptionType.SubCommandGroup } -@Deprecated( - "Use an is-check or cast instead.", - ReplaceWith("(this as CommandArgument.IntegerArgument).value", "dev.kord.common.entity.CommandArgument"), - level = ERROR, -) -public fun CommandArgument<*>.int(): Long { - return value as? Long ?: error("$value wasn't an int.") -} - - -@Deprecated( - "This function calls value.toString() which might be unexpected. Use an explicit value.toString() instead.", - ReplaceWith("this.value.toString()"), - level = ERROR, -) -public fun CommandArgument<*>.string(): String { - return value.toString() -} - - -@Deprecated( - "Use an is-check or cast instead.", - ReplaceWith("(this as CommandArgument.BooleanArgument).value", "dev.kord.common.entity.CommandArgument"), - level = ERROR, -) -public fun CommandArgument<*>.boolean(): Boolean { - return value as? Boolean ?: error("$value wasn't a Boolean.") -} - - -@Deprecated( - "This function calls value.toString() which might be unexpected. Use an explicit value.toString() instead.", - ReplaceWith("Snowflake(this.value.toString())", "dev.kord.common.entity.Snowflake"), - level = ERROR, -) -public fun CommandArgument<*>.snowflake(): Snowflake { - val id = value.toString().toULongOrNull() ?: error("$value wasn't a Snowflake") - return Snowflake(id) -} - - @Serializable public data class DiscordGuildApplicationCommandPermissions( val id: Snowflake, diff --git a/common/src/commonMain/kotlin/entity/Permission.kt b/common/src/commonMain/kotlin/entity/Permission.kt index ce1ed2211562..fdfc52c830e4 100644 --- a/common/src/commonMain/kotlin/entity/Permission.kt +++ b/common/src/commonMain/kotlin/entity/Permission.kt @@ -244,7 +244,7 @@ public sealed class Permission(public val code: DiscordBitSet) { public object ManageWebhooks : Permission(1L shl 29) /** Allows management and editing of emojis and stickers. */ - @Deprecated("Renamed by discord", ReplaceWith("ManageGuildExpressions"), DeprecationLevel.WARNING) + @Deprecated("Renamed by discord", ReplaceWith("ManageGuildExpressions"), DeprecationLevel.HIDDEN) public object ManageEmojisAndStickers : Permission(1L shl 30) /** Allows management and editing of emojis, stickers and soundboard sounds. */ @@ -295,6 +295,13 @@ public sealed class Permission(public val code: DiscordBitSet) { /** Allows for using soundboard in a voice channel. */ public object UseSoundboard : Permission(1L shl 42) + /** Allows the usage of custom soundboard sounds from other servers. */ + public object UseExternalSounds : Permission(1L shl 45) + + /** + * Allows sending voice messages. + */ + public object SendVoiceMessages : Permission(1L shl 46) /** All [Permission]s combined into one. */ public object All : Permission(buildAll()) @@ -349,7 +356,9 @@ public sealed class Permission(public val code: DiscordBitSet) { UseEmbeddedActivities, ModerateMembers, ViewCreatorMonetizationAnalytics, - UseSoundboard + UseSoundboard, + UseExternalSounds, + SendVoiceMessages ) } } diff --git a/common/src/commonMain/kotlin/entity/Presence.kt b/common/src/commonMain/kotlin/entity/Presence.kt index f7e64d735277..03fae1bb3dff 100644 --- a/common/src/commonMain/kotlin/entity/Presence.kt +++ b/common/src/commonMain/kotlin/entity/Presence.kt @@ -1,6 +1,5 @@ @file:GenerateKordEnum( name = "PresenceStatus", valueType = STRING, - deprecatedSerializerName = "StatusSerializer", docUrl = "https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types", entries = [ Entry("Online", stringValue = "online", kDoc = "Online."), diff --git a/common/src/commonMain/kotlin/entity/Team.kt b/common/src/commonMain/kotlin/entity/Team.kt index 9248b6253c05..5e7cc7d8aa3e 100644 --- a/common/src/commonMain/kotlin/entity/Team.kt +++ b/common/src/commonMain/kotlin/entity/Team.kt @@ -1,6 +1,5 @@ @file:GenerateKordEnum( name = "TeamMembershipState", valueType = INT, - deprecatedSerializerName = "TeamMembershipStateSerializer", docUrl = "https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum", entries = [ Entry("Invited", intValue = 1), diff --git a/common/src/commonMain/kotlin/entity/optional/Optional.kt b/common/src/commonMain/kotlin/entity/optional/Optional.kt index 96b157dfe696..743631bf49ee 100644 --- a/common/src/commonMain/kotlin/entity/optional/Optional.kt +++ b/common/src/commonMain/kotlin/entity/optional/Optional.kt @@ -218,6 +218,9 @@ public inline fun Optional>.mapList(mapper: (E) -> T): Optional Optional>.mapCopy(): Optional> = map { mutable -> mutable.toList() } +@JvmName("mapCopyOfMap") +public fun Optional>.mapCopy(): Optional> = map { mutable -> mutable.toMap() } + @Suppress("UNCHECKED_CAST") public inline fun Optional>.mapValues(mapper: (Map.Entry) -> R): Optional> = when (this) { diff --git a/common/src/commonMain/kotlin/serialization/DurationSerializers.kt b/common/src/commonMain/kotlin/serialization/DurationSerializers.kt index ea6339c797e6..aad1b7d5ad10 100644 --- a/common/src/commonMain/kotlin/serialization/DurationSerializers.kt +++ b/common/src/commonMain/kotlin/serialization/DurationSerializers.kt @@ -13,6 +13,7 @@ import kotlin.time.DurationUnit import kotlin.time.DurationUnit.* import kotlin.time.toDuration +// -------- as Long -------- /** Serializer that encodes and decodes [Duration]s as a [Long] number of the specified [unit]. */ public sealed class DurationAsLongSerializer( @@ -107,3 +108,22 @@ public object DurationInDaysSerializer : DurationAsLongSerializer(DAYS, "Duratio /** A [Duration] that is [serializable][Serializable] with [DurationInDaysSerializer]. */ public typealias DurationInDays = @Serializable(with = DurationInDaysSerializer::class) Duration + + +// -------- as Double -------- + +/** Serializer that encodes and decodes [Duration]s as a [Double] number of seconds. */ +public object DurationInDoubleSecondsSerializer : KSerializer { + override val descriptor: SerialDescriptor = + PrimitiveSerialDescriptor("dev.kord.common.serialization.DurationInDoubleSeconds", PrimitiveKind.DOUBLE) + + override fun serialize(encoder: Encoder, value: Duration) { + if (value.isInfinite()) throw SerializationException("Infinite Durations cannot be serialized, got $value") + encoder.encodeDouble(value.toDouble(unit = SECONDS)) + } + + override fun deserialize(decoder: Decoder): Duration = decoder.decodeDouble().toDuration(unit = SECONDS) +} + +/** A [Duration] that is [serializable][Serializable] with [DurationInDoubleSecondsSerializer]. */ +public typealias DurationInDoubleSeconds = @Serializable(with = DurationInDoubleSecondsSerializer::class) Duration diff --git a/common/src/commonMain/kotlin/serialization/InstantSerializers.kt b/common/src/commonMain/kotlin/serialization/InstantSerializers.kt index 12fe03a99238..ad241f5ad429 100644 --- a/common/src/commonMain/kotlin/serialization/InstantSerializers.kt +++ b/common/src/commonMain/kotlin/serialization/InstantSerializers.kt @@ -37,11 +37,8 @@ public object InstantInEpochMillisecondsSerializer : KSerializer { } } -// TODO use this typealias instead of annotating types/properties with -// @Serializable(with = InstantInEpochMillisecondsSerializer::class) once -// https://github.com/Kotlin/kotlinx.serialization/issues/1895 is fixed -// /** An [Instant] that is [serializable][Serializable] with [InstantInEpochMillisecondsSerializer]. */ -// public typealias InstantInEpochMilliseconds = @Serializable(with = InstantInEpochMillisecondsSerializer::class) Instant +/** An [Instant] that is [serializable][Serializable] with [InstantInEpochMillisecondsSerializer]. */ +public typealias InstantInEpochMilliseconds = @Serializable(with = InstantInEpochMillisecondsSerializer::class) Instant // epoch seconds @@ -62,8 +59,5 @@ public object InstantInEpochSecondsSerializer : KSerializer { } } -// TODO use this typealias instead of annotating types/properties with -// @Serializable(with = InstantInEpochSecondsSerializer::class) once -// https://github.com/Kotlin/kotlinx.serialization/issues/1895 is fixed -// /** An [Instant] that is [serializable][Serializable] with [InstantInEpochSecondsSerializer]. */ -// public typealias InstantInEpochSeconds = @Serializable(with = InstantInEpochSecondsSerializer::class) Instant +/** An [Instant] that is [serializable][Serializable] with [InstantInEpochSecondsSerializer]. */ +public typealias InstantInEpochSeconds = @Serializable(with = InstantInEpochSecondsSerializer::class) Instant diff --git a/common/src/commonTest/kotlin/entity/optional/OptionalBooleanTest.kt b/common/src/commonTest/kotlin/entity/optional/OptionalBooleanTest.kt index 74142b875b27..687a86569444 100644 --- a/common/src/commonTest/kotlin/entity/optional/OptionalBooleanTest.kt +++ b/common/src/commonTest/kotlin/entity/optional/OptionalBooleanTest.kt @@ -41,7 +41,7 @@ internal class OptionalBooleanTest { } @Serializable - private class ValueOptionalEntity(@Suppress("unused") val value: OptionalBoolean = OptionalBoolean.Missing) + private class ValueOptionalEntity(val value: OptionalBoolean = OptionalBoolean.Missing) @Test @JsName("test3") diff --git a/common/src/commonTest/kotlin/entity/optional/OptionalIntTest.kt b/common/src/commonTest/kotlin/entity/optional/OptionalIntTest.kt index cda9d356eb19..fcd994c462ef 100644 --- a/common/src/commonTest/kotlin/entity/optional/OptionalIntTest.kt +++ b/common/src/commonTest/kotlin/entity/optional/OptionalIntTest.kt @@ -40,7 +40,7 @@ internal class OptionalIntTest { } @Serializable - class ValueOptionalEntity(@Suppress("unused") val value: OptionalInt = OptionalInt.Missing) + class ValueOptionalEntity(val value: OptionalInt = OptionalInt.Missing) @Test @JsName("test3") diff --git a/common/src/commonTest/kotlin/entity/optional/OptionalLongTest.kt b/common/src/commonTest/kotlin/entity/optional/OptionalLongTest.kt index d67d1e6d5d53..f576edae6e3f 100644 --- a/common/src/commonTest/kotlin/entity/optional/OptionalLongTest.kt +++ b/common/src/commonTest/kotlin/entity/optional/OptionalLongTest.kt @@ -26,7 +26,7 @@ internal class OptionalLongTest { @Serializable - class NullOptionalEntity(@Suppress("unused") val value: OptionalLong = OptionalLong.Missing) + class NullOptionalEntity(val value: OptionalLong = OptionalLong.Missing) @Test @JsName("test2") @@ -42,7 +42,7 @@ internal class OptionalLongTest { @Serializable - class ValueOptionalEntity(@Suppress("unused") val value: OptionalLong = OptionalLong.Missing) + class ValueOptionalEntity(val value: OptionalLong = OptionalLong.Missing) @Test @JsName("test3") diff --git a/common/src/commonTest/kotlin/entity/optional/OptionalSnowflakeTest.kt b/common/src/commonTest/kotlin/entity/optional/OptionalSnowflakeTest.kt index d7f4b05a391a..2ff3cf3a4095 100644 --- a/common/src/commonTest/kotlin/entity/optional/OptionalSnowflakeTest.kt +++ b/common/src/commonTest/kotlin/entity/optional/OptionalSnowflakeTest.kt @@ -28,7 +28,7 @@ internal class OptionalSnowflakeTest { @Serializable - class NullOptionalEntity(@Suppress("unused") val value: OptionalSnowflake = OptionalSnowflake.Missing) + class NullOptionalEntity(val value: OptionalSnowflake = OptionalSnowflake.Missing) @Test @JsName("test2") @@ -43,7 +43,7 @@ internal class OptionalSnowflakeTest { @Serializable - class ValueOptionalEntity(@Suppress("unused") val value: OptionalSnowflake = OptionalSnowflake.Missing) + class ValueOptionalEntity(val value: OptionalSnowflake = OptionalSnowflake.Missing) @Test @JsName("test3") diff --git a/common/src/commonTest/kotlin/json/ChannelTest.kt b/common/src/commonTest/kotlin/json/ChannelTest.kt index 9153fbd5d252..9d2d58d711b3 100644 --- a/common/src/commonTest/kotlin/json/ChannelTest.kt +++ b/common/src/commonTest/kotlin/json/ChannelTest.kt @@ -25,7 +25,9 @@ class ChannelTest { recipients.value!!.size shouldBe 1 with(recipients.value!!.first()) { username shouldBe "test" + @Suppress("DEPRECATION") discriminator shouldBe "9999" + globalName shouldBe null id.toString() shouldBe "82198898841029460" avatar shouldBe "33ecab261d4681afa4d85a04691c4a01" } @@ -62,13 +64,17 @@ class ChannelTest { recipients.value!!.size shouldBe 2 with(recipients.value!!.first()) { username shouldBe "test" + @Suppress("DEPRECATION") discriminator shouldBe "9999" + globalName shouldBe null id.toString() shouldBe "82198898841029460" avatar shouldBe "33ecab261d4681afa4d85a04691c4a01" } with(recipients.value!![1]) { username shouldBe "test2" + @Suppress("DEPRECATION") discriminator shouldBe "9999" + globalName shouldBe "amazing name" id.toString() shouldBe "82198810841029460" avatar shouldBe "33ecab261d4681afa4d85a10691c4a01" } diff --git a/common/src/commonTest/kotlin/json/EmojiTest.kt b/common/src/commonTest/kotlin/json/EmojiTest.kt index 3cca7f47aaf2..897bd4145b2b 100644 --- a/common/src/commonTest/kotlin/json/EmojiTest.kt +++ b/common/src/commonTest/kotlin/json/EmojiTest.kt @@ -45,7 +45,9 @@ class EmojiTest { roles shouldBe listOf("41771983429993000", "41771983429993111").map { Snowflake(it) } with(user.value!!) { username shouldBe "Luigi" + @Suppress("DEPRECATION") discriminator shouldBe "0002" + globalName shouldBe null id shouldBe "96008815106887111" avatar shouldBe "5500909a3274e1812beb4e8de6631111" } diff --git a/common/src/commonTest/kotlin/json/GuildTest.kt b/common/src/commonTest/kotlin/json/GuildTest.kt index d74d43977f83..3894cbf3203c 100644 --- a/common/src/commonTest/kotlin/json/GuildTest.kt +++ b/common/src/commonTest/kotlin/json/GuildTest.kt @@ -61,6 +61,8 @@ class GuildTest { rulesChannelId shouldBe "441688182833020939" publicUpdatesChannelId shouldBe "281283303326089216" nsfwLevel shouldBe NsfwLevel.Default + premiumProgressBarEnabled shouldBe false + safetyAlertsChannelId shouldBe "587324906702766226" } } diff --git a/common/src/commonTest/kotlin/json/MessageTest.kt b/common/src/commonTest/kotlin/json/MessageTest.kt index 5fea99400e97..0a1ad0d26a8c 100644 --- a/common/src/commonTest/kotlin/json/MessageTest.kt +++ b/common/src/commonTest/kotlin/json/MessageTest.kt @@ -37,7 +37,9 @@ class MessageTest { editedTimestamp shouldBe null with(author) { username shouldBe "Mason" + @Suppress("DEPRECATION") discriminator shouldBe "9999" + globalName shouldBe null id shouldBe "53908099506183680" avatar shouldBe "a_bab14f271d565501444b2ca3be944b25" } @@ -75,7 +77,9 @@ class MessageTest { editedTimestamp shouldBe null with(author) { username shouldBe "Mason" + @Suppress("DEPRECATION") discriminator shouldBe "9999" + globalName shouldBe "Mason!" id.toString() shouldBe "53908099506183680" avatar shouldBe "a_bab14f271d565501444b2ca3be944b25" } diff --git a/common/src/commonTest/kotlin/json/UserTest.kt b/common/src/commonTest/kotlin/json/UserTest.kt index a5c9c3e2d821..08159927193a 100644 --- a/common/src/commonTest/kotlin/json/UserTest.kt +++ b/common/src/commonTest/kotlin/json/UserTest.kt @@ -20,7 +20,9 @@ class UserTest { with(user) { id.toString() shouldBe "80351110224678912" username shouldBe "Nelly" + @Suppress("DEPRECATION") discriminator shouldBe "1337" + globalName shouldBe "Nelly" avatar shouldBe "8342729096ea3675442027381ff50dfe" verified.asNullable!! shouldBe true email.value shouldBe "nelly@discordapp.com" diff --git a/common/src/commonTest/kotlin/serialization/DurationInDoubleSecondsSerializerTest.kt b/common/src/commonTest/kotlin/serialization/DurationInDoubleSecondsSerializerTest.kt new file mode 100644 index 000000000000..1e1bbd47481c --- /dev/null +++ b/common/src/commonTest/kotlin/serialization/DurationInDoubleSecondsSerializerTest.kt @@ -0,0 +1,103 @@ +package dev.kord.common.serialization + +import kotlinx.serialization.SerializationException +import kotlinx.serialization.json.Json +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertFailsWith +import kotlin.time.Duration +import kotlin.time.Duration.Companion.milliseconds +import kotlin.time.Duration.Companion.nanoseconds +import kotlin.time.Duration.Companion.seconds + +class DurationInDoubleSecondsSerializerTest { + private fun serialize(duration: Duration) = Json.encodeToString(DurationInDoubleSecondsSerializer, duration) + private fun deserialize(json: String) = Json.decodeFromString(DurationInDoubleSecondsSerializer, json) + + + @Test + fun zero_Duration_can_be_serialized() { + assertEquals(expected = 0.0.toString(), actual = serialize(Duration.ZERO)) + } + + @Test + fun zero_Duration_can_be_deserialized() { + for (jsonZero in listOf("0", "0.0", "0.0000", "0.00e-0864", "0E+456")) { + assertEquals(expected = Duration.ZERO, actual = deserialize(jsonZero)) + } + } + + + @Test + fun infinite_Durations_cannot_be_serialized() { + assertFailsWith { serialize(Duration.INFINITE) } + assertFailsWith { serialize(-Duration.INFINITE) } + } + + private val largestFiniteDuration = (Long.MAX_VALUE / 2 - 1).milliseconds + + init { + check(largestFiniteDuration.isFinite()) + check(largestFiniteDuration + (1.milliseconds - 1.nanoseconds) == largestFiniteDuration) + check((largestFiniteDuration + 1.milliseconds).isInfinite()) + } + + @Test + fun largest_finite_Durations_can_be_serialized() { + assertEquals(4.611686018427388e+15.toString(), serialize(largestFiniteDuration)) + assertEquals((-4.611686018427388e+15).toString(), serialize(-largestFiniteDuration)) + } + + + private val duration2Jsons = listOf( + 123.seconds to listOf(123.0.toString(), "123", "0.1230E+3", "1230.0e-1"), + 5646.876456.seconds to listOf("5646.876456", "5646.87645600", "5.646876456e003"), + 4631.89.seconds to listOf("4631.89", "4631.890000000", "46.3189000000E2"), + 4.595632e+1.seconds to listOf("45.95632", "4.595632e+1"), + ) + + @Test + fun positive_Durations_can_be_serialized() { + for ((duration, jsons) in duration2Jsons) { + assertEquals(expected = jsons.first(), actual = serialize(duration)) + } + } + + @Test + fun positive_Durations_can_be_deserialized() { + for ((duration, jsons) in duration2Jsons) { + for (json in jsons) { + assertEquals(expected = duration, actual = deserialize(json)) + } + } + } + + @Test + fun negative_Durations_can_be_serialized() { + for ((duration, jsons) in duration2Jsons) { + assertEquals(expected = "-${jsons.first()}", actual = serialize(-duration)) + } + } + + @Test + fun negative_Durations_can_be_deserialized() { + for ((duration, jsons) in duration2Jsons) { + for (json in jsons) { + assertEquals(expected = -duration, actual = deserialize("-$json")) + } + } + } + + + private val largeJson = "4611686018427388" // MAX_MILLIS / 1_000 + 1 + + @Test + fun large_positive_Duration_gets_deserialized_as_Infinity() { + assertEquals(expected = Duration.INFINITE, deserialize(largeJson)) + } + + @Test + fun large_negative_Duration_gets_deserialized_as_negative_Infinity() { + assertEquals(expected = -Duration.INFINITE, deserialize("-$largeJson")) + } +} diff --git a/common/src/commonTest/kotlin/serialization/DurationSerializersTests.kt b/common/src/commonTest/kotlin/serialization/DurationSerializersTests.kt index 5a5e5761bdbc..438ae90955ba 100644 --- a/common/src/commonTest/kotlin/serialization/DurationSerializersTests.kt +++ b/common/src/commonTest/kotlin/serialization/DurationSerializersTests.kt @@ -16,7 +16,7 @@ import kotlin.time.Duration.Companion.nanoseconds import kotlin.time.Duration.Companion.seconds import kotlin.time.DurationUnit.MILLISECONDS -abstract class DurationSerializerTest( +abstract class DurationAsLongSerializerTest( private val json: String, private val duration: Duration, private val durationToRound: Duration, @@ -132,7 +132,7 @@ abstract class DurationSerializerTest( } -class DurationInNanosecondsSerializerTest : DurationSerializerTest( +class DurationInNanosecondsSerializerTest : DurationAsLongSerializerTest( json = "84169", duration = 84169.nanoseconds, durationToRound = 84169.48.nanoseconds, @@ -142,7 +142,7 @@ class DurationInNanosecondsSerializerTest : DurationSerializerTest( serializer = DurationInNanosecondsSerializer, ) -class DurationInMicrosecondsSerializerTest : DurationSerializerTest( +class DurationInMicrosecondsSerializerTest : DurationAsLongSerializerTest( json = "25622456", duration = 25622456.microseconds, durationToRound = 25622456.4.microseconds, @@ -152,7 +152,7 @@ class DurationInMicrosecondsSerializerTest : DurationSerializerTest( serializer = DurationInMicrosecondsSerializer, ) -class DurationInMillisecondsSerializerTest : DurationSerializerTest( +class DurationInMillisecondsSerializerTest : DurationAsLongSerializerTest( json = "3495189", duration = 3495189.milliseconds, durationToRound = 3495189.24.milliseconds, @@ -160,7 +160,7 @@ class DurationInMillisecondsSerializerTest : DurationSerializerTest( serializer = DurationInMillisecondsSerializer, ) -class DurationInSecondsSerializerTest : DurationSerializerTest( +class DurationInSecondsSerializerTest : DurationAsLongSerializerTest( json = "987465", duration = 987465.seconds, durationToRound = 987465.489.seconds, @@ -168,7 +168,7 @@ class DurationInSecondsSerializerTest : DurationSerializerTest( serializer = DurationInSecondsSerializer, ) -class DurationInMinutesSerializerTest : DurationSerializerTest( +class DurationInMinutesSerializerTest : DurationAsLongSerializerTest( json = "24905", duration = 24905.minutes, durationToRound = 24905.164.minutes, @@ -176,7 +176,7 @@ class DurationInMinutesSerializerTest : DurationSerializerTest( serializer = DurationInMinutesSerializer, ) -class DurationInHoursSerializerTest : DurationSerializerTest( +class DurationInHoursSerializerTest : DurationAsLongSerializerTest( json = "7245", duration = 7245.hours, durationToRound = 7245.24.hours, @@ -184,7 +184,7 @@ class DurationInHoursSerializerTest : DurationSerializerTest( serializer = DurationInHoursSerializer, ) -class DurationInDaysSerializerTest : DurationSerializerTest( +class DurationInDaysSerializerTest : DurationAsLongSerializerTest( json = "92", duration = 92.days, durationToRound = 92.12.days, diff --git a/common/src/commonTest/kotlin/serialization/InstantSerializersTests.kt b/common/src/commonTest/kotlin/serialization/InstantSerializersTests.kt index 70ccbd59d53a..fd14270901e3 100644 --- a/common/src/commonTest/kotlin/serialization/InstantSerializersTests.kt +++ b/common/src/commonTest/kotlin/serialization/InstantSerializersTests.kt @@ -1,6 +1,5 @@ package dev.kord.common.serialization -import dev.kord.test.IgnoreOnJs import kotlinx.datetime.Instant import kotlinx.serialization.KSerializer import kotlinx.serialization.SerializationException @@ -9,7 +8,9 @@ import kotlin.js.JsName import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertFailsWith +import kotlin.time.Duration import kotlin.time.Duration.Companion.nanoseconds +import kotlin.time.Duration.Companion.seconds private val EPOCH = Instant.fromEpochSeconds(0) @@ -68,21 +69,32 @@ abstract class InstantSerializerTest( } -@IgnoreOnJs // currently can't pass class InstantInEpochMillisecondsSerializerTest : InstantSerializerTest( json = "796514689159", instant = Instant.fromEpochMilliseconds(796514689159), serializer = InstantInEpochMillisecondsSerializer, ) { - private val futureInstantExactlyAtLimit = Instant.fromEpochMilliseconds(Long.MAX_VALUE) - private val pastInstantExactlyAtLimit = Instant.fromEpochMilliseconds(Long.MIN_VALUE) + // workaround for https://github.com/Kotlin/kotlinx-datetime/issues/263, use normal operators when fix is released + private infix fun Instant.plus(duration: Duration) = (this + 1.seconds) - (1.seconds - duration) + private infix fun Instant.minus(duration: Duration) = (this - 1.seconds) + (1.seconds - duration) + + + private val past = Instant.fromEpochMilliseconds(Long.MIN_VALUE) + private val future = Instant.fromEpochMilliseconds(Long.MAX_VALUE) + + // platform-dependent + private val pastClamped = past.toEpochMilliseconds() != Long.MIN_VALUE + private val futureClamped = future.toEpochMilliseconds() != Long.MAX_VALUE + + private val clampedMin = Instant.fromEpochSeconds(Long.MIN_VALUE, Long.MIN_VALUE).toEpochMilliseconds() + private val clampedMax = Instant.fromEpochSeconds(Long.MAX_VALUE, Long.MAX_VALUE).toEpochMilliseconds() @Test @JsName("test7") fun `future Instant under limit can be serialized`() { assertEquals( - expected = (Long.MAX_VALUE - 1).toString(), - actual = serialize(futureInstantExactlyAtLimit - 1.nanoseconds), + expected = (if (futureClamped) clampedMax else Long.MAX_VALUE - 1).toString(), + actual = serialize(future minus 1.nanoseconds), ) } @@ -90,8 +102,8 @@ class InstantInEpochMillisecondsSerializerTest : InstantSerializerTest( @JsName("test8") fun `past Instant under limit can be serialized`() { assertEquals( - expected = Long.MIN_VALUE.toString(), - actual = serialize(pastInstantExactlyAtLimit + 1.nanoseconds), + expected = (if (pastClamped) clampedMin else Long.MIN_VALUE).toString(), + actual = serialize(past plus 1.nanoseconds), ) } @@ -99,26 +111,32 @@ class InstantInEpochMillisecondsSerializerTest : InstantSerializerTest( @Test @JsName("test9") fun `future Instant exactly at limit can be serialized`() { - assertEquals(expected = Long.MAX_VALUE.toString(), actual = serialize(futureInstantExactlyAtLimit)) + assertEquals( + expected = (if (futureClamped) clampedMax else Long.MAX_VALUE).toString(), + actual = serialize(future), + ) } @Test @JsName("test10") fun `past Instant exactly at limit can be serialized`() { - assertEquals(expected = Long.MIN_VALUE.toString(), actual = serialize(pastInstantExactlyAtLimit)) + assertEquals( + expected = (if (pastClamped) clampedMin else Long.MIN_VALUE).toString(), + actual = serialize(past), + ) } @Test @JsName("test11") fun `future Instant over limit cannot be serialized`() { - assertFailsWith { serialize(futureInstantExactlyAtLimit + 1.nanoseconds) } + if (!futureClamped) assertFailsWith { serialize(future plus 1.nanoseconds) } } @Test @JsName("test12") fun `past Instant over limit cannot be serialized`() { - assertFailsWith { serialize(pastInstantExactlyAtLimit - 1.nanoseconds) } + if (!pastClamped) assertFailsWith { serialize(past minus 1.nanoseconds) } } } diff --git a/common/src/commonTest/resources/json/channel/dmchannel.json b/common/src/commonTest/resources/json/channel/dmchannel.json index 63c338d63a5e..6bdb6692924d 100644 --- a/common/src/commonTest/resources/json/channel/dmchannel.json +++ b/common/src/commonTest/resources/json/channel/dmchannel.json @@ -6,8 +6,9 @@ { "username": "test", "discriminator": "9999", + "global_name": null, "id": "82198898841029460", "avatar": "33ecab261d4681afa4d85a04691c4a01" } ] -} \ No newline at end of file +} diff --git a/common/src/commonTest/resources/json/channel/groupdmchannel.json b/common/src/commonTest/resources/json/channel/groupdmchannel.json index 4cc7ee0bafdd..c0afb7c4c374 100644 --- a/common/src/commonTest/resources/json/channel/groupdmchannel.json +++ b/common/src/commonTest/resources/json/channel/groupdmchannel.json @@ -5,12 +5,14 @@ { "username": "test", "discriminator": "9999", + "global_name": null, "id": "82198898841029460", "avatar": "33ecab261d4681afa4d85a04691c4a01" }, { "username": "test2", "discriminator": "9999", + "global_name": "amazing name", "id": "82198810841029460", "avatar": "33ecab261d4681afa4d85a10691c4a01" } @@ -19,4 +21,4 @@ "type": 3, "id": "319674150115710528", "owner_id": "82198810841029460" -} \ No newline at end of file +} diff --git a/common/src/commonTest/resources/json/emoji/emoji.json b/common/src/commonTest/resources/json/emoji/emoji.json index 46ef30c76b69..bff0136249bc 100644 --- a/common/src/commonTest/resources/json/emoji/emoji.json +++ b/common/src/commonTest/resources/json/emoji/emoji.json @@ -5,6 +5,7 @@ "user": { "username": "Luigi", "discriminator": "0002", + "global_name": null, "id": "96008815106887111", "avatar": "5500909a3274e1812beb4e8de6631111" }, diff --git a/common/src/commonTest/resources/json/guild/guild.json b/common/src/commonTest/resources/json/guild/guild.json index 5dd66f983c32..e2b76b35a177 100644 --- a/common/src/commonTest/resources/json/guild/guild.json +++ b/common/src/commonTest/resources/json/guild/guild.json @@ -40,6 +40,6 @@ "rules_channel_id": "441688182833020939", "public_updates_channel_id": "281283303326089216", "nsfw_level": 0, - "premium_progress_bar_enabled": false - -} \ No newline at end of file + "premium_progress_bar_enabled": false, + "safety_alerts_channel_id": "587324906702766226" +} diff --git a/common/src/commonTest/resources/json/interaction/groupsubcommand.json b/common/src/commonTest/resources/json/interaction/groupsubcommand.json index 9727b92467ec..a5a7d0d8cd0e 100644 --- a/common/src/commonTest/resources/json/interaction/groupsubcommand.json +++ b/common/src/commonTest/resources/json/interaction/groupsubcommand.json @@ -8,6 +8,7 @@ "public_flags": 64, "id": "695549908383432716", "discriminator": "9000", + "global_name": null, "avatar": "68922a048551bb4b0dda88b65e85d8f1" }, "roles": [ diff --git a/common/src/commonTest/resources/json/interaction/rootcommand.json b/common/src/commonTest/resources/json/interaction/rootcommand.json index 41948f8149ed..bade6fdf227a 100644 --- a/common/src/commonTest/resources/json/interaction/rootcommand.json +++ b/common/src/commonTest/resources/json/interaction/rootcommand.json @@ -8,6 +8,7 @@ "public_flags": 64, "id": "695549908383432716", "discriminator": "9000", + "global_name": null, "avatar": "68922a048551bb4b0dda88b65e85d8f1" }, "roles": [ diff --git a/common/src/commonTest/resources/json/interaction/selectmenu.json b/common/src/commonTest/resources/json/interaction/selectmenu.json index fb5af8cdd8ac..b6612122f21a 100644 --- a/common/src/commonTest/resources/json/interaction/selectmenu.json +++ b/common/src/commonTest/resources/json/interaction/selectmenu.json @@ -30,6 +30,7 @@ "user":{ "avatar": "a_d5efa99b3eeaa7dd43acca82f5692432", "discriminator": "1337", + "global_name": null, "id": "53908232506183680", "public_flags": 131141, "username": "Mason" @@ -42,6 +43,7 @@ "avatar": null, "bot": true, "discriminator": "5284", + "global_name": null, "id": "845027738276462632", "public_flags": 0, "username": "Interactions Test" @@ -102,6 +104,7 @@ "user": { "avatar": "a_d5efa99b3eeaa7dd43acca82f5692432", "discriminator": "1337", + "global_name": null, "id": "53908232506183680", "public_flags": 131141, "username": "Mason" diff --git a/common/src/commonTest/resources/json/interaction/subcommand.json b/common/src/commonTest/resources/json/interaction/subcommand.json index 5933000d22f0..dc7c201f467a 100644 --- a/common/src/commonTest/resources/json/interaction/subcommand.json +++ b/common/src/commonTest/resources/json/interaction/subcommand.json @@ -8,6 +8,7 @@ "public_flags": 64, "id": "695549908383432716", "discriminator": "9000", + "global_name": null, "avatar": "68922a048551bb4b0dda88b65e85d8f1" }, "roles": [ diff --git a/common/src/commonTest/resources/json/message/crossposted.json b/common/src/commonTest/resources/json/message/crossposted.json index 9936d00cf619..b9e8d8c49522 100644 --- a/common/src/commonTest/resources/json/message/crossposted.json +++ b/common/src/commonTest/resources/json/message/crossposted.json @@ -20,6 +20,7 @@ "author": { "username": "Mason", "discriminator": "9999", + "global_name": "Mason!", "id": "53908099506183680", "avatar": "a_bab14f271d565501444b2ca3be944b25" }, diff --git a/common/src/commonTest/resources/json/message/message.json b/common/src/commonTest/resources/json/message/message.json index 1d187b5284fd..d69accc7b445 100644 --- a/common/src/commonTest/resources/json/message/message.json +++ b/common/src/commonTest/resources/json/message/message.json @@ -20,6 +20,7 @@ "author": { "username": "Mason", "discriminator": "9999", + "global_name": null, "id": "53908099506183680", "avatar": "a_bab14f271d565501444b2ca3be944b25" }, diff --git a/common/src/commonTest/resources/json/user/user.json b/common/src/commonTest/resources/json/user/user.json index 9099c62b1a63..9408c241a80c 100644 --- a/common/src/commonTest/resources/json/user/user.json +++ b/common/src/commonTest/resources/json/user/user.json @@ -2,9 +2,10 @@ "id": "80351110224678912", "username": "Nelly", "discriminator": "1337", + "global_name": "Nelly", "avatar": "8342729096ea3675442027381ff50dfe", "verified": true, "email": "nelly@discordapp.com", "flags": 64, "premium_type": 1 -} \ No newline at end of file +} diff --git a/common/src/jsMain/kotlin/http/HttpEngine.kt b/common/src/jsMain/kotlin/HttpEngine.kt similarity index 100% rename from common/src/jsMain/kotlin/http/HttpEngine.kt rename to common/src/jsMain/kotlin/HttpEngine.kt diff --git a/common/src/nonJvmMain/kotlin/ConcurrentHashMap.kt b/common/src/nonJvmMain/kotlin/ConcurrentHashMap.kt index be329858c821..656290cb5967 100644 --- a/common/src/nonJvmMain/kotlin/ConcurrentHashMap.kt +++ b/common/src/nonJvmMain/kotlin/ConcurrentHashMap.kt @@ -5,4 +5,6 @@ import dev.kord.common.annotation.KordInternal /** @suppress */ @KordInternal -public actual typealias ConcurrentHashMap = ConcurrentMutableMap +// using an actual typealias seems to be broken in Kotlin/JS 1.9.0 +// public actual typealias ConcurrentHashMap = ConcurrentMutableMap +public actual class ConcurrentHashMap : MutableMap by ConcurrentMutableMap() diff --git a/core/api/core.api b/core/api/core.api index 3c38ed0f8ef4..b68ed6467238 100644 --- a/core/api/core.api +++ b/core/api/core.api @@ -1,6 +1,5 @@ public final class dev/kord/core/ClientResources { public fun (Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/gateway/builder/Shards;ILio/ktor/client/HttpClient;Ldev/kord/core/supplier/EntitySupplyStrategy;)V - public synthetic fun (Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/gateway/builder/Shards;Lio/ktor/client/HttpClient;Ldev/kord/core/supplier/EntitySupplyStrategy;)V public final fun getApplicationId ()Ldev/kord/common/entity/Snowflake; public final fun getDefaultStrategy ()Ldev/kord/core/supplier/EntitySupplyStrategy; public final fun getHttpClient ()Lio/ktor/client/HttpClient; @@ -32,6 +31,7 @@ public final class dev/kord/core/Kord : kotlinx/coroutines/CoroutineScope { public final fun editSelf (Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun equals (Ljava/lang/Object;)Z public final fun getApplicationInfo (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getApplicationRoleConnectionMetadataRecords (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getCache ()Ldev/kord/cache/api/DataCache; public final fun getChannel (Ldev/kord/common/entity/Snowflake;Ldev/kord/core/supplier/EntitySupplyStrategy;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun getChannel$default (Ldev/kord/core/Kord;Ldev/kord/common/entity/Snowflake;Ldev/kord/core/supplier/EntitySupplyStrategy;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; @@ -45,7 +45,7 @@ public final class dev/kord/core/Kord : kotlinx/coroutines/CoroutineScope { public final fun getGlobalApplicationCommandOrNull (Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getGlobalApplicationCommands (Ljava/lang/Boolean;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun getGlobalApplicationCommands$default (Ldev/kord/core/Kord;Ljava/lang/Boolean;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; - public final synthetic fun getGuild (Ldev/kord/common/entity/Snowflake;Ldev/kord/core/supplier/EntitySupplyStrategy;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getGuild (Ldev/kord/common/entity/Snowflake;Ldev/kord/core/supplier/EntitySupplyStrategy;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun getGuild$default (Ldev/kord/core/Kord;Ldev/kord/common/entity/Snowflake;Ldev/kord/core/supplier/EntitySupplyStrategy;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public final fun getGuildApplicationCommand (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getGuildApplicationCommandOrNull (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -83,11 +83,13 @@ public final class dev/kord/core/Kord : kotlinx/coroutines/CoroutineScope { public static synthetic fun getWebhookWithToken$default (Ldev/kord/core/Kord;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/core/supplier/EntitySupplyStrategy;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public final fun getWebhookWithTokenOrNull (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/core/supplier/EntitySupplyStrategy;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun getWebhookWithTokenOrNull$default (Ldev/kord/core/Kord;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/core/supplier/EntitySupplyStrategy;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public fun hashCode ()I public final fun login (Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun login$default (Ldev/kord/core/Kord;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public final fun logout (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun shutdown (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun toString ()Ljava/lang/String; + public final fun updateApplicationRoleConnectionMetadataRecords (Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun with (Ldev/kord/core/supplier/EntitySupplyStrategy;)Ldev/kord/core/supplier/EntitySupplier; } @@ -393,7 +395,9 @@ public final class dev/kord/core/behavior/GuildBehaviorKt { public static final fun createKeywordPresetAutoModerationRule (Ldev/kord/core/behavior/GuildBehavior;Ljava/lang/String;Ldev/kord/common/entity/AutoModerationRuleEventType;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun createKeywordPresetAutoModerationRule$default (Ldev/kord/core/behavior/GuildBehavior;Ljava/lang/String;Ldev/kord/common/entity/AutoModerationRuleEventType;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun createMentionSpamAutoModerationRule (Ldev/kord/core/behavior/GuildBehavior;Ljava/lang/String;Ldev/kord/common/entity/AutoModerationRuleEventType;ILkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun createMentionSpamAutoModerationRule (Ldev/kord/core/behavior/GuildBehavior;Ljava/lang/String;Ldev/kord/common/entity/AutoModerationRuleEventType;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun createMentionSpamAutoModerationRule$default (Ldev/kord/core/behavior/GuildBehavior;Ljava/lang/String;Ldev/kord/common/entity/AutoModerationRuleEventType;ILkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static synthetic fun createMentionSpamAutoModerationRule$default (Ldev/kord/core/behavior/GuildBehavior;Ljava/lang/String;Ldev/kord/common/entity/AutoModerationRuleEventType;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun createMessageCommand (Ldev/kord/core/behavior/GuildBehavior;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun createMessageCommand$default (Ldev/kord/core/behavior/GuildBehavior;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun createNewsChannel (Ldev/kord/core/behavior/GuildBehavior;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -1157,7 +1161,6 @@ public final class dev/kord/core/behavior/channel/GuildChannelBehaviorKt { public abstract interface class dev/kord/core/behavior/channel/GuildMessageChannelBehavior : dev/kord/core/behavior/channel/GuildChannelBehavior, dev/kord/core/behavior/channel/MessageChannelBehavior { public abstract fun asChannel (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public abstract fun asChannelOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract synthetic fun bulkDelete (Ljava/lang/Iterable;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public abstract fun bulkDelete (Ljava/lang/Iterable;ZLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public abstract fun fetchChannel (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public abstract fun fetchChannelOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -1167,9 +1170,7 @@ public abstract interface class dev/kord/core/behavior/channel/GuildMessageChann public final class dev/kord/core/behavior/channel/GuildMessageChannelBehavior$DefaultImpls { public static fun asChannel (Ldev/kord/core/behavior/channel/GuildMessageChannelBehavior;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun asChannelOrNull (Ldev/kord/core/behavior/channel/GuildMessageChannelBehavior;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun bulkDelete (Ldev/kord/core/behavior/channel/GuildMessageChannelBehavior;Ljava/lang/Iterable;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun bulkDelete (Ldev/kord/core/behavior/channel/GuildMessageChannelBehavior;Ljava/lang/Iterable;ZLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun bulkDelete$default (Ldev/kord/core/behavior/channel/GuildMessageChannelBehavior;Ljava/lang/Iterable;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun bulkDelete$default (Ldev/kord/core/behavior/channel/GuildMessageChannelBehavior;Ljava/lang/Iterable;ZLjava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static fun compareTo (Ldev/kord/core/behavior/channel/GuildMessageChannelBehavior;Ldev/kord/core/entity/Entity;)I public static fun createMessage (Ldev/kord/core/behavior/channel/GuildMessageChannelBehavior;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -1257,9 +1258,7 @@ public abstract interface class dev/kord/core/behavior/channel/NewsChannelBehavi public abstract fun follow (Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public abstract fun getActiveThreads ()Lkotlinx/coroutines/flow/Flow; public abstract fun getPublicArchivedThreads (Lkotlinx/datetime/Instant;Ljava/lang/Integer;)Lkotlinx/coroutines/flow/Flow; - public abstract fun startPublicThread (Ljava/lang/String;Ldev/kord/common/entity/ArchiveDuration;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public abstract fun startPublicThread (Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun startPublicThreadWithMessage (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/ArchiveDuration;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public abstract fun startPublicThreadWithMessage (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public abstract fun withStrategy (Ldev/kord/core/supplier/EntitySupplyStrategy;)Ldev/kord/core/behavior/channel/NewsChannelBehavior; } @@ -1268,7 +1267,6 @@ public final class dev/kord/core/behavior/channel/NewsChannelBehavior$DefaultImp public static fun addOverwrite (Ldev/kord/core/behavior/channel/NewsChannelBehavior;Ldev/kord/core/entity/PermissionOverwrite;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun asChannel (Ldev/kord/core/behavior/channel/NewsChannelBehavior;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun asChannelOrNull (Ldev/kord/core/behavior/channel/NewsChannelBehavior;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun bulkDelete (Ldev/kord/core/behavior/channel/NewsChannelBehavior;Ljava/lang/Iterable;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun bulkDelete (Ldev/kord/core/behavior/channel/NewsChannelBehavior;Ljava/lang/Iterable;ZLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun compareTo (Ldev/kord/core/behavior/channel/NewsChannelBehavior;Ldev/kord/core/entity/Entity;)I public static fun createMessage (Ldev/kord/core/behavior/channel/NewsChannelBehavior;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -1293,12 +1291,10 @@ public final class dev/kord/core/behavior/channel/NewsChannelBehavior$DefaultImp public static fun getPosition (Ldev/kord/core/behavior/channel/NewsChannelBehavior;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun getPublicArchivedThreads (Ldev/kord/core/behavior/channel/NewsChannelBehavior;Lkotlinx/datetime/Instant;Ljava/lang/Integer;)Lkotlinx/coroutines/flow/Flow; public static fun getWebhooks (Ldev/kord/core/behavior/channel/NewsChannelBehavior;)Lkotlinx/coroutines/flow/Flow; - public static fun startPublicThread (Ldev/kord/core/behavior/channel/NewsChannelBehavior;Ljava/lang/String;Ldev/kord/common/entity/ArchiveDuration;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun startPublicThread (Ldev/kord/core/behavior/channel/NewsChannelBehavior;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun startPublicThread$default (Ldev/kord/core/behavior/channel/NewsChannelBehavior;Ljava/lang/String;Ldev/kord/common/entity/ArchiveDuration;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static fun startPublicThreadWithMessage (Ldev/kord/core/behavior/channel/NewsChannelBehavior;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/ArchiveDuration;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun startPublicThread$default (Ldev/kord/core/behavior/channel/NewsChannelBehavior;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static fun startPublicThreadWithMessage (Ldev/kord/core/behavior/channel/NewsChannelBehavior;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun startPublicThreadWithMessage$default (Ldev/kord/core/behavior/channel/NewsChannelBehavior;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/ArchiveDuration;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static synthetic fun startPublicThreadWithMessage$default (Ldev/kord/core/behavior/channel/NewsChannelBehavior;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static fun type (Ldev/kord/core/behavior/channel/NewsChannelBehavior;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun typeUntil (Ldev/kord/core/behavior/channel/NewsChannelBehavior;Lkotlin/time/TimeMark;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun typeUntil (Ldev/kord/core/behavior/channel/NewsChannelBehavior;Lkotlinx/datetime/Instant;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -1321,7 +1317,6 @@ public final class dev/kord/core/behavior/channel/StageChannelBehavior$DefaultIm public static fun addOverwrite (Ldev/kord/core/behavior/channel/StageChannelBehavior;Ldev/kord/core/entity/PermissionOverwrite;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun asChannel (Ldev/kord/core/behavior/channel/StageChannelBehavior;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun asChannelOrNull (Ldev/kord/core/behavior/channel/StageChannelBehavior;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun bulkDelete (Ldev/kord/core/behavior/channel/StageChannelBehavior;Ljava/lang/Iterable;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun bulkDelete (Ldev/kord/core/behavior/channel/StageChannelBehavior;Ljava/lang/Iterable;ZLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun compareTo (Ldev/kord/core/behavior/channel/StageChannelBehavior;Ldev/kord/core/entity/Entity;)I public static fun createMessage (Ldev/kord/core/behavior/channel/StageChannelBehavior;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -1371,11 +1366,8 @@ public abstract interface class dev/kord/core/behavior/channel/TextChannelBehavi public abstract fun getJoinedPrivateArchivedThreads (Ldev/kord/common/entity/Snowflake;Ljava/lang/Integer;)Lkotlinx/coroutines/flow/Flow; public abstract fun getPrivateArchivedThreads (Lkotlinx/datetime/Instant;Ljava/lang/Integer;)Lkotlinx/coroutines/flow/Flow; public abstract fun getPublicArchivedThreads (Lkotlinx/datetime/Instant;Ljava/lang/Integer;)Lkotlinx/coroutines/flow/Flow; - public abstract fun startPrivateThread (Ljava/lang/String;Ldev/kord/common/entity/ArchiveDuration;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public abstract fun startPrivateThread (Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun startPublicThread (Ljava/lang/String;Ldev/kord/common/entity/ArchiveDuration;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public abstract fun startPublicThread (Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun startPublicThreadWithMessage (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/ArchiveDuration;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public abstract fun startPublicThreadWithMessage (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public abstract fun withStrategy (Ldev/kord/core/supplier/EntitySupplyStrategy;)Ldev/kord/core/behavior/channel/TextChannelBehavior; } @@ -1384,7 +1376,6 @@ public final class dev/kord/core/behavior/channel/TextChannelBehavior$DefaultImp public static fun addOverwrite (Ldev/kord/core/behavior/channel/TextChannelBehavior;Ldev/kord/core/entity/PermissionOverwrite;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun asChannel (Ldev/kord/core/behavior/channel/TextChannelBehavior;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun asChannelOrNull (Ldev/kord/core/behavior/channel/TextChannelBehavior;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun bulkDelete (Ldev/kord/core/behavior/channel/TextChannelBehavior;Ljava/lang/Iterable;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun bulkDelete (Ldev/kord/core/behavior/channel/TextChannelBehavior;Ljava/lang/Iterable;ZLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun compareTo (Ldev/kord/core/behavior/channel/TextChannelBehavior;Ldev/kord/core/entity/Entity;)I public static fun createMessage (Ldev/kord/core/behavior/channel/TextChannelBehavior;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -1410,15 +1401,12 @@ public final class dev/kord/core/behavior/channel/TextChannelBehavior$DefaultImp public static fun getPrivateArchivedThreads (Ldev/kord/core/behavior/channel/TextChannelBehavior;Lkotlinx/datetime/Instant;Ljava/lang/Integer;)Lkotlinx/coroutines/flow/Flow; public static fun getPublicArchivedThreads (Ldev/kord/core/behavior/channel/TextChannelBehavior;Lkotlinx/datetime/Instant;Ljava/lang/Integer;)Lkotlinx/coroutines/flow/Flow; public static fun getWebhooks (Ldev/kord/core/behavior/channel/TextChannelBehavior;)Lkotlinx/coroutines/flow/Flow; - public static fun startPrivateThread (Ldev/kord/core/behavior/channel/TextChannelBehavior;Ljava/lang/String;Ldev/kord/common/entity/ArchiveDuration;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun startPrivateThread (Ldev/kord/core/behavior/channel/TextChannelBehavior;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun startPrivateThread$default (Ldev/kord/core/behavior/channel/TextChannelBehavior;Ljava/lang/String;Ldev/kord/common/entity/ArchiveDuration;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static fun startPublicThread (Ldev/kord/core/behavior/channel/TextChannelBehavior;Ljava/lang/String;Ldev/kord/common/entity/ArchiveDuration;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun startPrivateThread$default (Ldev/kord/core/behavior/channel/TextChannelBehavior;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static fun startPublicThread (Ldev/kord/core/behavior/channel/TextChannelBehavior;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun startPublicThread$default (Ldev/kord/core/behavior/channel/TextChannelBehavior;Ljava/lang/String;Ldev/kord/common/entity/ArchiveDuration;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static fun startPublicThreadWithMessage (Ldev/kord/core/behavior/channel/TextChannelBehavior;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/ArchiveDuration;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun startPublicThread$default (Ldev/kord/core/behavior/channel/TextChannelBehavior;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static fun startPublicThreadWithMessage (Ldev/kord/core/behavior/channel/TextChannelBehavior;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun startPublicThreadWithMessage$default (Ldev/kord/core/behavior/channel/TextChannelBehavior;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/ArchiveDuration;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static synthetic fun startPublicThreadWithMessage$default (Ldev/kord/core/behavior/channel/TextChannelBehavior;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static fun type (Ldev/kord/core/behavior/channel/TextChannelBehavior;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun typeUntil (Ldev/kord/core/behavior/channel/TextChannelBehavior;Lkotlin/time/TimeMark;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun typeUntil (Ldev/kord/core/behavior/channel/TextChannelBehavior;Lkotlinx/datetime/Instant;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -1475,7 +1463,6 @@ public final class dev/kord/core/behavior/channel/TopGuildMessageChannelBehavior public static fun addOverwrite (Ldev/kord/core/behavior/channel/TopGuildMessageChannelBehavior;Ldev/kord/core/entity/PermissionOverwrite;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun asChannel (Ldev/kord/core/behavior/channel/TopGuildMessageChannelBehavior;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun asChannelOrNull (Ldev/kord/core/behavior/channel/TopGuildMessageChannelBehavior;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun bulkDelete (Ldev/kord/core/behavior/channel/TopGuildMessageChannelBehavior;Ljava/lang/Iterable;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun bulkDelete (Ldev/kord/core/behavior/channel/TopGuildMessageChannelBehavior;Ljava/lang/Iterable;ZLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun compareTo (Ldev/kord/core/behavior/channel/TopGuildMessageChannelBehavior;Ldev/kord/core/entity/Entity;)I public static fun createMessage (Ldev/kord/core/behavior/channel/TopGuildMessageChannelBehavior;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -1520,7 +1507,6 @@ public final class dev/kord/core/behavior/channel/VoiceChannelBehavior$DefaultIm public static fun addOverwrite (Ldev/kord/core/behavior/channel/VoiceChannelBehavior;Ldev/kord/core/entity/PermissionOverwrite;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun asChannel (Ldev/kord/core/behavior/channel/VoiceChannelBehavior;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun asChannelOrNull (Ldev/kord/core/behavior/channel/VoiceChannelBehavior;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun bulkDelete (Ldev/kord/core/behavior/channel/VoiceChannelBehavior;Ljava/lang/Iterable;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun bulkDelete (Ldev/kord/core/behavior/channel/VoiceChannelBehavior;Ljava/lang/Iterable;ZLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun compareTo (Ldev/kord/core/behavior/channel/VoiceChannelBehavior;Ldev/kord/core/entity/Entity;)I public static fun createMessage (Ldev/kord/core/behavior/channel/VoiceChannelBehavior;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -1603,7 +1589,6 @@ public final class dev/kord/core/behavior/channel/threads/ThreadChannelBehavior$ public static fun addUser (Ldev/kord/core/behavior/channel/threads/ThreadChannelBehavior;Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun asChannel (Ldev/kord/core/behavior/channel/threads/ThreadChannelBehavior;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun asChannelOrNull (Ldev/kord/core/behavior/channel/threads/ThreadChannelBehavior;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun bulkDelete (Ldev/kord/core/behavior/channel/threads/ThreadChannelBehavior;Ljava/lang/Iterable;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun bulkDelete (Ldev/kord/core/behavior/channel/threads/ThreadChannelBehavior;Ljava/lang/Iterable;ZLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun compareTo (Ldev/kord/core/behavior/channel/threads/ThreadChannelBehavior;Ldev/kord/core/entity/Entity;)I public static fun createMessage (Ldev/kord/core/behavior/channel/threads/ThreadChannelBehavior;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -1730,7 +1715,6 @@ public final class dev/kord/core/behavior/interaction/AutoCompleteInteractionBeh } public final class dev/kord/core/behavior/interaction/AutoCompleteInteractionBehaviorKt { - public static final fun suggestInt (Ldev/kord/core/behavior/interaction/AutoCompleteInteractionBehavior;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun suggestInteger (Ldev/kord/core/behavior/interaction/AutoCompleteInteractionBehavior;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun suggestNumber (Ldev/kord/core/behavior/interaction/AutoCompleteInteractionBehavior;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun suggestString (Ldev/kord/core/behavior/interaction/AutoCompleteInteractionBehavior;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -2116,11 +2100,6 @@ public final class dev/kord/core/builder/kord/KordBuilder : dev/kord/core/builde public final fun setEnableShutdownHook (Z)V } -public final class dev/kord/core/builder/kord/KordBuilderKt { - public static final synthetic fun invoke (Ldev/kord/gateway/DefaultGateway$Companion;Ldev/kord/core/ClientResources;Ldev/kord/gateway/retry/Retry;)Ldev/kord/gateway/DefaultGateway; - public static synthetic fun invoke$default (Ldev/kord/gateway/DefaultGateway$Companion;Ldev/kord/core/ClientResources;Ldev/kord/gateway/retry/Retry;ILjava/lang/Object;)Ldev/kord/gateway/DefaultGateway; -} - public final class dev/kord/core/builder/kord/KordBuilderUtilKt { } @@ -2171,7 +2150,8 @@ public final class dev/kord/core/cache/CachingGateway : dev/kord/cache/api/DataC } public final class dev/kord/core/cache/DataCacheExtensionsKt { - public static final fun createView (Ldev/kord/cache/api/DataCache;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun createView (Ldev/kord/cache/api/DataCache;)Ldev/kord/core/cache/DataCacheView; + public static final synthetic fun createView (Ldev/kord/cache/api/DataCache;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; } public final class dev/kord/core/cache/DataCacheView : dev/kord/cache/api/DataCache { @@ -2269,7 +2249,7 @@ public final class dev/kord/core/cache/data/ActivityData { public final fun getUrl ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/ActivityData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/ActivityData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/ActivityData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2326,7 +2306,7 @@ public final class dev/kord/core/cache/data/ApplicationCommandData { public final fun getVersion ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/ApplicationCommandData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/ApplicationCommandData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/ApplicationCommandData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2359,7 +2339,7 @@ public final class dev/kord/core/cache/data/ApplicationCommandGroupData { public final fun getDescription ()Ljava/lang/String; public final fun getName ()Ljava/lang/String; public final fun getSubCommands ()Ljava/util/List; - public static final fun write$Self (Ldev/kord/core/cache/data/ApplicationCommandGroupData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/ApplicationCommandGroupData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/ApplicationCommandGroupData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2390,7 +2370,7 @@ public final class dev/kord/core/cache/data/ApplicationCommandOptionChoiceData { public final fun getValue ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/ApplicationCommandOptionChoiceData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/ApplicationCommandOptionChoiceData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/ApplicationCommandOptionChoiceData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2443,7 +2423,7 @@ public final class dev/kord/core/cache/data/ApplicationCommandOptionData { public final fun getType ()Ldev/kord/common/entity/ApplicationCommandOptionType; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/ApplicationCommandOptionData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/ApplicationCommandOptionData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/ApplicationCommandOptionData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2482,7 +2462,7 @@ public final class dev/kord/core/cache/data/ApplicationCommandParameterData { public final fun getRequired ()Ldev/kord/common/entity/optional/OptionalBoolean; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/ApplicationCommandParameterData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/ApplicationCommandParameterData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/ApplicationCommandParameterData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2518,7 +2498,7 @@ public final class dev/kord/core/cache/data/ApplicationCommandSubcommandData { public fun hashCode ()I public final fun isDefault ()Ldev/kord/common/entity/optional/OptionalBoolean; public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/ApplicationCommandSubcommandData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/ApplicationCommandSubcommandData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/ApplicationCommandSubcommandData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2538,9 +2518,9 @@ public final class dev/kord/core/cache/data/ApplicationCommandSubcommandData$Com public final class dev/kord/core/cache/data/ApplicationData : dev/kord/core/cache/data/BaseApplicationData { public static final field Companion Ldev/kord/core/cache/data/ApplicationData$Companion; - public synthetic fun (ILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ljava/lang/String;Ldev/kord/core/cache/data/TeamData;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ljava/lang/String;Ldev/kord/core/cache/data/TeamData;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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;)V - public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ljava/lang/String;Ldev/kord/core/cache/data/TeamData;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (ILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ljava/lang/String;Ldev/kord/core/cache/data/TeamData;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/Optional;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ljava/lang/String;Ldev/kord/core/cache/data/TeamData;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/Optional;)V + public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ljava/lang/String;Ldev/kord/core/cache/data/TeamData;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/Optional;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/kord/common/entity/Snowflake; public final fun component10 ()Ldev/kord/common/entity/optional/OptionalSnowflake; public final fun component11 ()Ljava/lang/String; @@ -2554,6 +2534,7 @@ public final class dev/kord/core/cache/data/ApplicationData : dev/kord/core/cach public final fun component19 ()Ldev/kord/common/entity/optional/Optional; public final fun component2 ()Ljava/lang/String; public final fun component20 ()Ldev/kord/common/entity/optional/Optional; + public final fun component21 ()Ldev/kord/common/entity/optional/Optional; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ljava/lang/String; public final fun component5 ()Ldev/kord/common/entity/optional/Optional; @@ -2561,8 +2542,8 @@ public final class dev/kord/core/cache/data/ApplicationData : dev/kord/core/cach public final fun component7 ()Z public final fun component8 ()Ldev/kord/common/entity/optional/Optional; public final fun component9 ()Ldev/kord/common/entity/optional/Optional; - public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ljava/lang/String;Ldev/kord/core/cache/data/TeamData;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/core/cache/data/ApplicationData; - public static synthetic fun copy$default (Ldev/kord/core/cache/data/ApplicationData;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ljava/lang/String;Ldev/kord/core/cache/data/TeamData;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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;ILjava/lang/Object;)Ldev/kord/core/cache/data/ApplicationData; + public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ljava/lang/String;Ldev/kord/core/cache/data/TeamData;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/Optional;)Ldev/kord/core/cache/data/ApplicationData; + public static synthetic fun copy$default (Ldev/kord/core/cache/data/ApplicationData;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;ZZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ljava/lang/String;Ldev/kord/core/cache/data/TeamData;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/Optional;ILjava/lang/Object;)Ldev/kord/core/cache/data/ApplicationData; public fun equals (Ljava/lang/Object;)Z public final fun getBotPublic ()Z public final fun getBotRequireCodeGrant ()Z @@ -2578,6 +2559,7 @@ public final class dev/kord/core/cache/data/ApplicationData : dev/kord/core/cach public fun getOwnerId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public fun getPrimarySkuId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public fun getPrivacyPolicyUrl ()Ldev/kord/common/entity/optional/Optional; + public fun getRoleConnectionsVerificationUrl ()Ldev/kord/common/entity/optional/Optional; public fun getRpcOrigins ()Ldev/kord/common/entity/optional/Optional; public fun getSlug ()Ldev/kord/common/entity/optional/Optional; public fun getTags ()Ldev/kord/common/entity/optional/Optional; @@ -2586,7 +2568,7 @@ public final class dev/kord/core/cache/data/ApplicationData : dev/kord/core/cach public fun getVerifyKey ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/ApplicationData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/ApplicationData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/ApplicationData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2638,7 +2620,7 @@ public final class dev/kord/core/cache/data/ApplicationInteractionData { public final fun getValues ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/ApplicationInteractionData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/ApplicationInteractionData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/ApplicationInteractionData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2659,11 +2641,13 @@ public final class dev/kord/core/cache/data/ApplicationInteractionData$Companion public final class dev/kord/core/cache/data/AttachmentData { public static final field Companion Ldev/kord/core/cache/data/AttachmentData$Companion; - public synthetic fun (ILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;)V - public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (ILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;)V + public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/kord/common/entity/Snowflake; public final fun component10 ()Ldev/kord/common/entity/optional/OptionalBoolean; + public final fun component11 ()Ldev/kord/common/entity/optional/Optional; + public final fun component12 ()Ldev/kord/common/entity/optional/Optional; public final fun component2 ()Ljava/lang/String; public final fun component3 ()Ldev/kord/common/entity/optional/Optional; public final fun component4 ()Ldev/kord/common/entity/optional/Optional; @@ -2672,11 +2656,12 @@ public final class dev/kord/core/cache/data/AttachmentData { public final fun component7 ()Ljava/lang/String; public final fun component8 ()Ldev/kord/common/entity/optional/OptionalInt; public final fun component9 ()Ldev/kord/common/entity/optional/OptionalInt; - public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;)Ldev/kord/core/cache/data/AttachmentData; - public static synthetic fun copy$default (Ldev/kord/core/cache/data/AttachmentData;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;ILjava/lang/Object;)Ldev/kord/core/cache/data/AttachmentData; + public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;)Ldev/kord/core/cache/data/AttachmentData; + public static synthetic fun copy$default (Ldev/kord/core/cache/data/AttachmentData;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ILjava/lang/Object;)Ldev/kord/core/cache/data/AttachmentData; public fun equals (Ljava/lang/Object;)Z public final fun getContentType ()Ldev/kord/common/entity/optional/Optional; public final fun getDescription ()Ldev/kord/common/entity/optional/Optional; + public final fun getDurationSecs ()Ldev/kord/common/entity/optional/Optional; public final fun getEphemeral ()Ldev/kord/common/entity/optional/OptionalBoolean; public final fun getFilename ()Ljava/lang/String; public final fun getHeight ()Ldev/kord/common/entity/optional/OptionalInt; @@ -2684,10 +2669,11 @@ public final class dev/kord/core/cache/data/AttachmentData { public final fun getProxyUrl ()Ljava/lang/String; public final fun getSize ()I public final fun getUrl ()Ljava/lang/String; + public final fun getWaveform ()Ldev/kord/common/entity/optional/Optional; public final fun getWidth ()Ldev/kord/common/entity/optional/OptionalInt; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/AttachmentData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/AttachmentData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/AttachmentData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2720,7 +2706,7 @@ public final class dev/kord/core/cache/data/AutoModerationActionData { public final fun getType ()Ldev/kord/common/entity/AutoModerationActionType; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/AutoModerationActionData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/AutoModerationActionData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/AutoModerationActionData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2756,7 +2742,7 @@ public final class dev/kord/core/cache/data/AutoModerationActionMetadataData { public final fun getDurationSeconds ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/AutoModerationActionMetadataData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/AutoModerationActionMetadataData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/AutoModerationActionMetadataData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2806,7 +2792,7 @@ public final class dev/kord/core/cache/data/AutoModerationRuleData { public final fun getTriggerType ()Ldev/kord/common/entity/AutoModerationRuleTriggerType; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/AutoModerationRuleData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/AutoModerationRuleData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/AutoModerationRuleData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2829,25 +2815,27 @@ public final class dev/kord/core/cache/data/AutoModerationRuleData$Companion { public final class dev/kord/core/cache/data/AutoModerationRuleTriggerMetadataData { public static final field Companion Ldev/kord/core/cache/data/AutoModerationRuleTriggerMetadataData$Companion; public fun ()V - public synthetic fun (ILdev/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/OptionalInt;Lkotlinx/serialization/internal/SerializationConstructorMarker;)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/OptionalInt;)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/OptionalInt;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (ILdev/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/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;Lkotlinx/serialization/internal/SerializationConstructorMarker;)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/OptionalInt;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/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/kord/common/entity/optional/Optional; 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; public final fun component5 ()Ldev/kord/common/entity/optional/OptionalInt; - 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/OptionalInt;)Ldev/kord/core/cache/data/AutoModerationRuleTriggerMetadataData; - public static synthetic fun copy$default (Ldev/kord/core/cache/data/AutoModerationRuleTriggerMetadataData;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/OptionalInt;ILjava/lang/Object;)Ldev/kord/core/cache/data/AutoModerationRuleTriggerMetadataData; + public final fun component6 ()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/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;)Ldev/kord/core/cache/data/AutoModerationRuleTriggerMetadataData; + public static synthetic fun copy$default (Ldev/kord/core/cache/data/AutoModerationRuleTriggerMetadataData;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/OptionalInt;Ldev/kord/common/entity/optional/OptionalBoolean;ILjava/lang/Object;)Ldev/kord/core/cache/data/AutoModerationRuleTriggerMetadataData; public fun equals (Ljava/lang/Object;)Z public final fun getAllowList ()Ldev/kord/common/entity/optional/Optional; public final fun getKeywordFilter ()Ldev/kord/common/entity/optional/Optional; + public final fun getMentionRaidProtectionEnabled ()Ldev/kord/common/entity/optional/OptionalBoolean; public final fun getMentionTotalLimit ()Ldev/kord/common/entity/optional/OptionalInt; public final fun getPresets ()Ldev/kord/common/entity/optional/Optional; public final fun getRegexPatterns ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/AutoModerationRuleTriggerMetadataData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/AutoModerationRuleTriggerMetadataData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/AutoModerationRuleTriggerMetadataData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2882,7 +2870,7 @@ public final class dev/kord/core/cache/data/BanData { public final fun getUserId ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/BanData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/BanData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/BanData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -2914,6 +2902,7 @@ public abstract interface class dev/kord/core/cache/data/BaseApplicationData { public abstract fun getOwnerId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public abstract fun getPrimarySkuId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public abstract fun getPrivacyPolicyUrl ()Ldev/kord/common/entity/optional/Optional; + public abstract fun getRoleConnectionsVerificationUrl ()Ldev/kord/common/entity/optional/Optional; public abstract fun getRpcOrigins ()Ldev/kord/common/entity/optional/Optional; public abstract fun getSlug ()Ldev/kord/common/entity/optional/Optional; public abstract fun getTags ()Ldev/kord/common/entity/optional/Optional; @@ -3015,7 +3004,7 @@ public final class dev/kord/core/cache/data/ChannelData { public final fun getVideoQualityMode ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/ChannelData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/ChannelData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/ChannelData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3083,7 +3072,7 @@ public final class dev/kord/core/cache/data/ChatComponentData : dev/kord/core/ca public fun getValue ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/ChatComponentData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/ChatComponentData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/ChatComponentData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3118,7 +3107,7 @@ public final class dev/kord/core/cache/data/ClientStatusData { public final fun getWeb ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/ClientStatusData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/ClientStatusData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/ClientStatusData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3156,7 +3145,7 @@ public abstract class dev/kord/core/cache/data/ComponentData { public abstract fun getType ()Ldev/kord/common/entity/ComponentType; public abstract fun getUrl ()Ldev/kord/common/entity/optional/Optional; public abstract fun getValue ()Ldev/kord/common/entity/optional/Optional; - public static final fun write$Self (Ldev/kord/core/cache/data/ComponentData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/ComponentData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/ComponentData$Companion { @@ -3183,7 +3172,7 @@ public final class dev/kord/core/cache/data/EmbedAuthorData { public final fun getUrl ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/EmbedAuthorData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/EmbedAuthorData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/EmbedAuthorData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3239,7 +3228,7 @@ public final class dev/kord/core/cache/data/EmbedData { public final fun getVideo ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/EmbedData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/EmbedData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/EmbedData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3274,7 +3263,7 @@ public final class dev/kord/core/cache/data/EmbedFieldData { public final fun getValue ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/EmbedFieldData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/EmbedFieldData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/EmbedFieldData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3309,7 +3298,7 @@ public final class dev/kord/core/cache/data/EmbedFooterData { public final fun getText ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/EmbedFooterData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/EmbedFooterData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/EmbedFooterData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3347,7 +3336,7 @@ public final class dev/kord/core/cache/data/EmbedImageData { public final fun getWidth ()Ldev/kord/common/entity/optional/OptionalInt; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/EmbedImageData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/EmbedImageData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/EmbedImageData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3381,7 +3370,7 @@ public final class dev/kord/core/cache/data/EmbedProviderData { public final fun getUrl ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/EmbedProviderData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/EmbedProviderData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/EmbedProviderData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3419,7 +3408,7 @@ public final class dev/kord/core/cache/data/EmbedThumbnailData { public final fun getWidth ()Ldev/kord/common/entity/optional/OptionalInt; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/EmbedThumbnailData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/EmbedThumbnailData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/EmbedThumbnailData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3455,7 +3444,7 @@ public final class dev/kord/core/cache/data/EmbedVideoData { public final fun getWidth ()Ldev/kord/common/entity/optional/OptionalInt; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/EmbedVideoData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/EmbedVideoData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/EmbedVideoData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3502,7 +3491,7 @@ public final class dev/kord/core/cache/data/EmojiData { public final fun getUserId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/EmojiData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/EmojiData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/EmojiData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3571,9 +3560,9 @@ public final class dev/kord/core/cache/data/GuildApplicationCommandPermissionsDa public final class dev/kord/core/cache/data/GuildData { public static final field Companion Ldev/kord/core/cache/data/GuildData$Companion; - public synthetic fun (IILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Lkotlin/time/Duration;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/VerificationLevel;Ldev/kord/common/entity/DefaultMessageNotificationLevel;Ldev/kord/common/entity/ExplicitContentFilter;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/MFALevel;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/SystemChannelFlags;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/PremiumTier;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/NsfwLevel;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLkotlinx/serialization/internal/SerializationConstructorMarker;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;JLdev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/VerificationLevel;Ldev/kord/common/entity/DefaultMessageNotificationLevel;Ldev/kord/common/entity/ExplicitContentFilter;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/MFALevel;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/SystemChannelFlags;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/PremiumTier;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/NsfwLevel;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZIILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;JLdev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/VerificationLevel;Ldev/kord/common/entity/DefaultMessageNotificationLevel;Ldev/kord/common/entity/ExplicitContentFilter;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/MFALevel;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/SystemChannelFlags;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/PremiumTier;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/NsfwLevel;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (IILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Lkotlin/time/Duration;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/VerificationLevel;Ldev/kord/common/entity/DefaultMessageNotificationLevel;Ldev/kord/common/entity/ExplicitContentFilter;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/MFALevel;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/SystemChannelFlags;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/PremiumTier;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/NsfwLevel;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/Snowflake;Lkotlinx/serialization/internal/SerializationConstructorMarker;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;JLdev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/VerificationLevel;Ldev/kord/common/entity/DefaultMessageNotificationLevel;Ldev/kord/common/entity/ExplicitContentFilter;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/MFALevel;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/SystemChannelFlags;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/PremiumTier;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/NsfwLevel;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/Snowflake;IILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;JLdev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/VerificationLevel;Ldev/kord/common/entity/DefaultMessageNotificationLevel;Ldev/kord/common/entity/ExplicitContentFilter;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/MFALevel;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/SystemChannelFlags;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/PremiumTier;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/NsfwLevel;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/Snowflake;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/kord/common/entity/Snowflake; public final fun component10 ()Ldev/kord/common/entity/Snowflake; public final fun component11-UwyO8pc ()J @@ -3617,13 +3606,14 @@ public final class dev/kord/core/cache/data/GuildData { public final fun component46 ()Ldev/kord/common/entity/optional/Optional; public final fun component47 ()Ldev/kord/common/entity/optional/Optional; public final fun component48 ()Z + public final fun component49 ()Ldev/kord/common/entity/Snowflake; public final fun component5 ()Ldev/kord/common/entity/optional/Optional; public final fun component6 ()Ldev/kord/common/entity/optional/Optional; public final fun component7 ()Ldev/kord/common/entity/Snowflake; public final fun component8 ()Ldev/kord/common/entity/optional/Optional; public final fun component9 ()Ljava/lang/String; - public final fun copy-Q6IacG8 (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;JLdev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/VerificationLevel;Ldev/kord/common/entity/DefaultMessageNotificationLevel;Ldev/kord/common/entity/ExplicitContentFilter;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/MFALevel;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/SystemChannelFlags;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/PremiumTier;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/NsfwLevel;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Z)Ldev/kord/core/cache/data/GuildData; - public static synthetic fun copy-Q6IacG8$default (Ldev/kord/core/cache/data/GuildData;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;JLdev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/VerificationLevel;Ldev/kord/common/entity/DefaultMessageNotificationLevel;Ldev/kord/common/entity/ExplicitContentFilter;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/MFALevel;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/SystemChannelFlags;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/PremiumTier;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/NsfwLevel;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZIILjava/lang/Object;)Ldev/kord/core/cache/data/GuildData; + public final fun copy-Ddze6Yk (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;JLdev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/VerificationLevel;Ldev/kord/common/entity/DefaultMessageNotificationLevel;Ldev/kord/common/entity/ExplicitContentFilter;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/MFALevel;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/SystemChannelFlags;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/PremiumTier;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/NsfwLevel;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/Snowflake;)Ldev/kord/core/cache/data/GuildData; + public static synthetic fun copy-Ddze6Yk$default (Ldev/kord/core/cache/data/GuildData;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;JLdev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/VerificationLevel;Ldev/kord/common/entity/DefaultMessageNotificationLevel;Ldev/kord/common/entity/ExplicitContentFilter;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ldev/kord/common/entity/MFALevel;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/SystemChannelFlags;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/PremiumTier;Ldev/kord/common/entity/optional/OptionalInt;Ljava/lang/String;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/OptionalInt;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/NsfwLevel;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;ZLdev/kord/common/entity/Snowflake;IILjava/lang/Object;)Ldev/kord/core/cache/data/GuildData; public fun equals (Ljava/lang/Object;)Z public final fun getAfkChannelId ()Ldev/kord/common/entity/Snowflake; public final fun getAfkTimeout-UwyO8pc ()J @@ -3662,6 +3652,7 @@ public final class dev/kord/core/cache/data/GuildData { public final fun getRegion ()Ljava/lang/String; public final fun getRoles ()Ljava/util/List; public final fun getRulesChannelId ()Ldev/kord/common/entity/Snowflake; + public final fun getSafetyAlertsChannelId ()Ldev/kord/common/entity/Snowflake; public final fun getSplash ()Ldev/kord/common/entity/optional/Optional; public final fun getStageInstances ()Ldev/kord/common/entity/optional/Optional; public final fun getStickers ()Ldev/kord/common/entity/optional/Optional; @@ -3675,7 +3666,7 @@ public final class dev/kord/core/cache/data/GuildData { public final fun getWidgetEnabled ()Ldev/kord/common/entity/optional/OptionalBoolean; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/GuildData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/GuildData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/GuildData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3715,7 +3706,7 @@ public final class dev/kord/core/cache/data/GuildPreviewData { public final fun getName ()Ljava/lang/String; public final fun getSplash ()Ljava/lang/String; public final fun getStickers ()Ljava/util/List; - public static final fun write$Self (Ldev/kord/core/cache/data/GuildPreviewData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/GuildPreviewData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/GuildPreviewData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3776,7 +3767,7 @@ public final class dev/kord/core/cache/data/GuildScheduledEventData { public final fun getUserCount ()Ldev/kord/common/entity/optional/OptionalInt; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/GuildScheduledEventData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/GuildScheduledEventData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/GuildScheduledEventData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3808,7 +3799,7 @@ public final class dev/kord/core/cache/data/GuildWidgetData { public final fun getEnabled ()Z public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/GuildWidgetData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/GuildWidgetData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/GuildWidgetData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3869,7 +3860,7 @@ public final class dev/kord/core/cache/data/IntegrationData { public final fun getUser ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/IntegrationData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/IntegrationData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/IntegrationData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3901,7 +3892,7 @@ public final class dev/kord/core/cache/data/IntegrationsAccountData { public final fun getName ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/IntegrationsAccountData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/IntegrationsAccountData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/IntegrationsAccountData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -3960,7 +3951,7 @@ public final class dev/kord/core/cache/data/InteractionData { public final fun getVersion ()I public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/InteractionData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/InteractionData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/InteractionData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4013,7 +4004,7 @@ public final class dev/kord/core/cache/data/InviteCreateData { public final fun getUses ()I public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/InviteCreateData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/InviteCreateData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/InviteCreateData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4064,7 +4055,7 @@ public final class dev/kord/core/cache/data/InviteData : dev/kord/core/cache/dat public fun getTargetUserId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/InviteData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/InviteData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/InviteData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4099,7 +4090,7 @@ public final class dev/kord/core/cache/data/InviteDeleteData { public final fun getGuildId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/InviteDeleteData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/InviteDeleteData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/InviteDeleteData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4160,7 +4151,7 @@ public final class dev/kord/core/cache/data/InviteWithMetadataData : dev/kord/co public final fun getUses ()I public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/InviteWithMetadataData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/InviteWithMetadataData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/InviteWithMetadataData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4207,7 +4198,7 @@ public final class dev/kord/core/cache/data/MemberData { public final fun getUserId ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/MemberData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/MemberData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/MemberData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4261,7 +4252,7 @@ public final class dev/kord/core/cache/data/MembersChunkData { public final fun getUsers ()Ljava/util/Set; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/MembersChunkData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/MembersChunkData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/MembersChunkData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4352,7 +4343,7 @@ public final class dev/kord/core/cache/data/MessageData { public final fun plus (Ldev/kord/common/entity/DiscordPartialMessage;)Ldev/kord/core/cache/data/MessageData; public final fun plus (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/MessageReactionAddData;)Ldev/kord/core/cache/data/MessageData; public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/MessageData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/MessageData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/MessageData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4393,7 +4384,7 @@ public final class dev/kord/core/cache/data/MessageInteractionData { public final fun getUser ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/MessageInteractionData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/MessageInteractionData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/MessageInteractionData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4429,7 +4420,7 @@ public final class dev/kord/core/cache/data/MessageReferenceData { public final fun getId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/MessageReferenceData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/MessageReferenceData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/MessageReferenceData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4477,7 +4468,7 @@ public final class dev/kord/core/cache/data/OptionData { public final fun getValues ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/OptionData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/OptionData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/OptionData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4498,9 +4489,9 @@ public final class dev/kord/core/cache/data/OptionData$Companion { public final class dev/kord/core/cache/data/PartialApplicationData : dev/kord/core/cache/data/BaseApplicationData { public static final field Companion Ldev/kord/core/cache/data/PartialApplicationData$Companion; - public synthetic fun (ILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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;)V - public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (ILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/Optional;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/Optional;)V + public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/Optional;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/kord/common/entity/Snowflake; public final fun component10 ()Ldev/kord/common/entity/optional/OptionalSnowflake; public final fun component11 ()Ldev/kord/common/entity/optional/OptionalSnowflake; @@ -4510,6 +4501,7 @@ public final class dev/kord/core/cache/data/PartialApplicationData : dev/kord/co public final fun component15 ()Ldev/kord/common/entity/optional/Optional; public final fun component16 ()Ldev/kord/common/entity/optional/Optional; public final fun component17 ()Ldev/kord/common/entity/optional/Optional; + public final fun component18 ()Ldev/kord/common/entity/optional/Optional; public final fun component2 ()Ljava/lang/String; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ljava/lang/String; @@ -4518,8 +4510,8 @@ public final class dev/kord/core/cache/data/PartialApplicationData : dev/kord/co public final fun component7 ()Ldev/kord/common/entity/optional/Optional; public final fun component8 ()Ldev/kord/common/entity/optional/OptionalSnowflake; public final fun component9 ()Ljava/lang/String; - public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/core/cache/data/PartialApplicationData; - public static synthetic fun copy$default (Ldev/kord/core/cache/data/PartialApplicationData;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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;ILjava/lang/Object;)Ldev/kord/core/cache/data/PartialApplicationData; + public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/Optional;)Ldev/kord/core/cache/data/PartialApplicationData; + public static synthetic fun copy$default (Ldev/kord/core/cache/data/PartialApplicationData;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;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/Optional;ILjava/lang/Object;)Ldev/kord/core/cache/data/PartialApplicationData; public fun equals (Ljava/lang/Object;)Z public fun getCoverImage ()Ldev/kord/common/entity/optional/Optional; public fun getCustomInstallUrl ()Ldev/kord/common/entity/optional/Optional; @@ -4533,6 +4525,7 @@ public final class dev/kord/core/cache/data/PartialApplicationData : dev/kord/co public fun getOwnerId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public fun getPrimarySkuId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public fun getPrivacyPolicyUrl ()Ldev/kord/common/entity/optional/Optional; + public fun getRoleConnectionsVerificationUrl ()Ldev/kord/common/entity/optional/Optional; public fun getRpcOrigins ()Ldev/kord/common/entity/optional/Optional; public fun getSlug ()Ldev/kord/common/entity/optional/Optional; public fun getTags ()Ldev/kord/common/entity/optional/Optional; @@ -4540,7 +4533,7 @@ public final class dev/kord/core/cache/data/PartialApplicationData : dev/kord/co public fun getVerifyKey ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/PartialApplicationData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/PartialApplicationData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/PartialApplicationData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4581,7 +4574,7 @@ public final class dev/kord/core/cache/data/PartialGuildData { public final fun getVanityUrlCode ()Ldev/kord/common/entity/optional/Optional; public final fun getVerificationLevel ()Ldev/kord/common/entity/optional/Optional; public final fun getWelcomeScreen ()Ldev/kord/common/entity/optional/Optional; - public static final fun write$Self (Ldev/kord/core/cache/data/PartialGuildData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/PartialGuildData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/PartialGuildData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4617,7 +4610,7 @@ public final class dev/kord/core/cache/data/PermissionOverwriteData { public final fun getType ()Ldev/kord/common/entity/OverwriteType; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/PermissionOverwriteData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/PermissionOverwriteData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/PermissionOverwriteData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4655,7 +4648,7 @@ public final class dev/kord/core/cache/data/PresenceData { public final fun getUserId ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/PresenceData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/PresenceData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/PresenceData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4699,7 +4692,7 @@ public final class dev/kord/core/cache/data/ReactionData { public final fun getMe ()Z public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/ReactionData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/ReactionData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/ReactionData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4736,7 +4729,7 @@ public final class dev/kord/core/cache/data/ReactionRemoveEmojiData { public final fun getMessageId ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/ReactionRemoveEmojiData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/ReactionRemoveEmojiData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/ReactionRemoveEmojiData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4777,7 +4770,7 @@ public final class dev/kord/core/cache/data/RegionData { public final fun getOptimal ()Z public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/RegionData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/RegionData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/RegionData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4810,7 +4803,7 @@ public final class dev/kord/core/cache/data/RemovedReactionData { public final fun getName ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/RemovedReactionData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/RemovedReactionData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/RemovedReactionData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4852,7 +4845,7 @@ public final class dev/kord/core/cache/data/ResolvedObjectsData { public final fun getUsers ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/ResolvedObjectsData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/ResolvedObjectsData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/ResolvedObjectsData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4905,7 +4898,7 @@ public final class dev/kord/core/cache/data/RoleData { public final fun getUnicodeEmoji ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/RoleData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/RoleData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/RoleData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4952,7 +4945,7 @@ public final class dev/kord/core/cache/data/RoleTagsData { public final fun getSubscriptionListingId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/RoleTagsData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/RoleTagsData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/RoleTagsData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -4991,7 +4984,7 @@ public final class dev/kord/core/cache/data/SelectOptionData { public final fun getValue ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/SelectOptionData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/SelectOptionData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/SelectOptionData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5031,7 +5024,7 @@ public final class dev/kord/core/cache/data/StageInstanceData { public final fun getTopic ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/StageInstanceData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/StageInstanceData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/StageInstanceData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5084,7 +5077,7 @@ public final class dev/kord/core/cache/data/StickerData { public final fun getUser ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/StickerData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/StickerData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/StickerData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5119,7 +5112,7 @@ public final class dev/kord/core/cache/data/StickerItemData { public final fun getName ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/StickerItemData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/StickerItemData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/StickerItemData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5186,7 +5179,7 @@ public final class dev/kord/core/cache/data/TeamData { public final fun getOwnerUserId ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/TeamData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/TeamData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/TeamData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5213,7 +5206,7 @@ public final class dev/kord/core/cache/data/TeamMemberData { public final fun getPermissions ()Ljava/util/List; public final fun getTeamId ()Ldev/kord/common/entity/Snowflake; public final fun getUserId ()Ldev/kord/common/entity/Snowflake; - public static final fun write$Self (Ldev/kord/core/cache/data/TeamMemberData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/TeamMemberData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/TeamMemberData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5263,7 +5256,7 @@ public final class dev/kord/core/cache/data/TemplateData { public fun hashCode ()I public final fun isDirty ()Ljava/lang/Boolean; public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/TemplateData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/TemplateData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/TemplateData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5330,7 +5323,7 @@ public final class dev/kord/core/cache/data/TextInputComponentData : dev/kord/co public fun getValue ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/TextInputComponentData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/TextInputComponentData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/TextInputComponentData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5380,7 +5373,7 @@ public final class dev/kord/core/cache/data/ThreadMemberData { public final fun getUserId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/ThreadMemberData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/ThreadMemberData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/ThreadMemberData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5442,7 +5435,7 @@ public final class dev/kord/core/cache/data/ThreadMetadataData { public final fun getLocked ()Ldev/kord/common/entity/optional/OptionalBoolean; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/ThreadMetadataData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/ThreadMetadataData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/ThreadMetadataData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5463,31 +5456,33 @@ public final class dev/kord/core/cache/data/ThreadMetadataData$Companion { public final class dev/kord/core/cache/data/UserData { public static final field Companion Ldev/kord/core/cache/data/UserData$Companion; - public synthetic fun (ILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ljava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ljava/lang/Integer;)V - public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (ILdev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ljava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ljava/lang/Integer;)V + public synthetic fun (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/kord/common/entity/Snowflake; public final fun component2 ()Ljava/lang/String; - public final fun component3 ()Ljava/lang/String; - public final fun component4 ()Ljava/lang/String; - public final fun component5 ()Ldev/kord/common/entity/optional/OptionalBoolean; - public final fun component6 ()Ldev/kord/common/entity/optional/Optional; - public final fun component7 ()Ljava/lang/String; - public final fun component8 ()Ljava/lang/Integer; - public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ljava/lang/Integer;)Ldev/kord/core/cache/data/UserData; - public static synthetic fun copy$default (Ldev/kord/core/cache/data/UserData;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Ldev/kord/core/cache/data/UserData; + public final fun component3 ()Ldev/kord/common/entity/optional/Optional; + public final fun component4 ()Ldev/kord/common/entity/optional/Optional; + public final fun component5 ()Ljava/lang/String; + public final fun component6 ()Ldev/kord/common/entity/optional/OptionalBoolean; + public final fun component7 ()Ldev/kord/common/entity/optional/Optional; + public final fun component8 ()Ljava/lang/String; + public final fun component9 ()Ljava/lang/Integer; + public final fun copy (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ljava/lang/Integer;)Ldev/kord/core/cache/data/UserData; + public static synthetic fun copy$default (Ldev/kord/core/cache/data/UserData;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ldev/kord/common/entity/optional/OptionalBoolean;Ldev/kord/common/entity/optional/Optional;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Ldev/kord/core/cache/data/UserData; public fun equals (Ljava/lang/Object;)Z public final fun getAccentColor ()Ljava/lang/Integer; public final fun getAvatar ()Ljava/lang/String; public final fun getBanner ()Ljava/lang/String; public final fun getBot ()Ldev/kord/common/entity/optional/OptionalBoolean; - public final fun getDiscriminator ()Ljava/lang/String; + public final fun getDiscriminator ()Ldev/kord/common/entity/optional/Optional; + public final fun getGlobalName ()Ldev/kord/common/entity/optional/Optional; public final fun getId ()Ldev/kord/common/entity/Snowflake; public final fun getPublicFlags ()Ldev/kord/common/entity/optional/Optional; public final fun getUsername ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/UserData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/UserData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/UserData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5548,7 +5543,7 @@ public final class dev/kord/core/cache/data/VoiceStateData { public final fun getUserId ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/VoiceStateData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/VoiceStateData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/VoiceStateData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5600,7 +5595,7 @@ public final class dev/kord/core/cache/data/WebhookData { public final fun getUserId ()Ldev/kord/common/entity/optional/OptionalSnowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/WebhookData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/WebhookData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/WebhookData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5637,7 +5632,7 @@ public final class dev/kord/core/cache/data/WelcomeScreenChannelData { public final fun getEmojiName ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/WelcomeScreenChannelData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/WelcomeScreenChannelData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/WelcomeScreenChannelData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5669,7 +5664,7 @@ public final class dev/kord/core/cache/data/WelcomeScreenData { public final fun getWelcomeChannels ()Ljava/util/List; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/cache/data/WelcomeScreenData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/cache/data/WelcomeScreenData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/cache/data/WelcomeScreenData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -5771,6 +5766,37 @@ public final class dev/kord/core/entity/Application : dev/kord/core/entity/BaseA public synthetic fun withStrategy (Ldev/kord/core/supplier/EntitySupplyStrategy;)Ldev/kord/core/entity/Strategizable; } +public final class dev/kord/core/entity/Asset : dev/kord/core/KordObject { + public static final field Companion Ldev/kord/core/entity/Asset$Companion; + public synthetic fun (ZLdev/kord/rest/route/CdnUrl;Ldev/kord/core/Kord;Ldev/kord/rest/Image$Format;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getCdnUrl ()Ldev/kord/rest/route/CdnUrl; + public final fun getImage (Ldev/kord/rest/Image$Format;Ldev/kord/rest/Image$Size;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun getImage$default (Ldev/kord/core/entity/Asset;Ldev/kord/rest/Image$Format;Ldev/kord/rest/Image$Size;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public fun getKord ()Ldev/kord/core/Kord; + public final fun isAnimated ()Z +} + +public final class dev/kord/core/entity/Asset$Companion { + public final fun applicationCover (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/core/Kord;)Ldev/kord/core/entity/Asset; + public final fun applicationIcon (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/core/Kord;)Ldev/kord/core/entity/Asset; + public final fun defaultUserAvatar (ILdev/kord/core/Kord;)Ldev/kord/core/entity/Asset; + public final fun defaultUserAvatar (Ldev/kord/common/entity/Snowflake;Ldev/kord/core/Kord;)Ldev/kord/core/entity/Asset; + public final fun emoji (Ldev/kord/common/entity/Snowflake;ZLdev/kord/core/Kord;)Ldev/kord/core/entity/Asset; + public final fun guildBanner (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/core/Kord;)Ldev/kord/core/entity/Asset; + public final fun guildDiscoverySplash (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/core/Kord;)Ldev/kord/core/entity/Asset; + public final fun guildIcon (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/core/Kord;)Ldev/kord/core/entity/Asset; + public final fun guildScheduledEventCover (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/core/Kord;)Ldev/kord/core/entity/Asset; + public final fun guildSplash (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/core/Kord;)Ldev/kord/core/entity/Asset; + public final fun memberAvatar (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/core/Kord;)Ldev/kord/core/entity/Asset; + public final fun memberBanner (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/core/Kord;)Ldev/kord/core/entity/Asset; + public final fun roleIcon (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/core/Kord;)Ldev/kord/core/entity/Asset; + public final fun sticker (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/MessageStickerType;Ldev/kord/core/Kord;)Ldev/kord/core/entity/Asset; + public final fun stickerPackBanner (Ldev/kord/common/entity/Snowflake;Ldev/kord/core/Kord;)Ldev/kord/core/entity/Asset; + public final fun teamIcon (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/core/Kord;)Ldev/kord/core/entity/Asset; + public final fun userAvatar (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/core/Kord;)Ldev/kord/core/entity/Asset; + public final fun userBanner (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/core/Kord;)Ldev/kord/core/entity/Asset; +} + public final class dev/kord/core/entity/Attachment : dev/kord/core/entity/KordEntity { public fun (Ldev/kord/core/cache/data/AttachmentData;Ldev/kord/core/Kord;)V public fun compareTo (Ldev/kord/core/entity/Entity;)I @@ -5783,6 +5809,7 @@ public final class dev/kord/core/entity/Attachment : dev/kord/core/entity/KordEn public final fun getContentType ()Ljava/lang/String; public final fun getData ()Ldev/kord/core/cache/data/AttachmentData; public final fun getDescription ()Ljava/lang/String; + public final fun getDuration-FghU774 ()Lkotlin/time/Duration; public final fun getFilename ()Ljava/lang/String; public final fun getHeight ()Ljava/lang/Integer; public fun getId ()Ldev/kord/common/entity/Snowflake; @@ -5790,6 +5817,7 @@ public final class dev/kord/core/entity/Attachment : dev/kord/core/entity/KordEn public final fun getProxyUrl ()Ljava/lang/String; public final fun getSize ()I public final fun getUrl ()Ljava/lang/String; + public final fun getWaveform ()[B public final fun getWidth ()Ljava/lang/Integer; public fun hashCode ()I public final fun isEphemeral ()Z @@ -5852,6 +5880,7 @@ public abstract class dev/kord/core/entity/BaseApplication : dev/kord/core/entit public fun compareTo (Ldev/kord/core/entity/Entity;)I public synthetic fun compareTo (Ljava/lang/Object;)I public final fun equals (Ljava/lang/Object;)Z + public final fun getCoverImage ()Ldev/kord/core/entity/Asset; public final fun getCoverImageHash ()Ljava/lang/String; public final fun getCustomInstallUrl ()Ljava/lang/String; public abstract fun getData ()Ldev/kord/core/cache/data/BaseApplicationData; @@ -5860,6 +5889,7 @@ public abstract class dev/kord/core/entity/BaseApplication : dev/kord/core/entit public final fun getGuild ()Ldev/kord/core/behavior/GuildBehavior; public final fun getGuildId ()Ldev/kord/common/entity/Snowflake; public final fun getGuildOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getIcon ()Ldev/kord/core/entity/Asset; public final fun getIconHash ()Ljava/lang/String; public final fun getId ()Ldev/kord/common/entity/Snowflake; public final fun getInstallParams ()Ldev/kord/common/entity/InstallParams; @@ -5870,6 +5900,7 @@ public abstract class dev/kord/core/entity/BaseApplication : dev/kord/core/entit public final fun getOwnerOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getPrimarySkuId ()Ldev/kord/common/entity/Snowflake; public final fun getPrivacyPolicyUrl ()Ljava/lang/String; + public final fun getRoleConnectionsVerificationUrl ()Ljava/lang/String; public final fun getRpcOrigins ()Ljava/util/List; public final fun getSlug ()Ljava/lang/String; public final fun getSupplier ()Ldev/kord/core/supplier/EntitySupplier; @@ -6097,9 +6128,10 @@ public final class dev/kord/core/entity/Guild : dev/kord/core/behavior/GuildBeha public fun getAutoModerationRules ()Lkotlinx/coroutines/flow/Flow; public fun getBan (Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun getBanOrNull (Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getBanner (Ldev/kord/rest/Image$Format;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getBanner ()Ldev/kord/core/entity/Asset; + public final synthetic fun getBanner (Ldev/kord/rest/Image$Format;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getBannerHash ()Ljava/lang/String; - public final fun getBannerUrl (Ldev/kord/rest/Image$Format;)Ljava/lang/String; + public final synthetic fun getBannerUrl (Ldev/kord/rest/Image$Format;)Ljava/lang/String; public fun getBans ()Lkotlinx/coroutines/flow/Flow; public fun getCachedThreads ()Lkotlinx/coroutines/flow/Flow; public fun getChannel (Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -6111,9 +6143,10 @@ public final class dev/kord/core/entity/Guild : dev/kord/core/behavior/GuildBeha public final fun getData ()Ldev/kord/core/cache/data/GuildData; public final fun getDefaultMessageNotificationLevel ()Ldev/kord/common/entity/DefaultMessageNotificationLevel; public final fun getDescription ()Ljava/lang/String; - public final fun getDiscoverySplash (Ldev/kord/rest/Image$Format;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getDiscoverySplash ()Ldev/kord/core/entity/Asset; + public final synthetic fun getDiscoverySplash (Ldev/kord/rest/Image$Format;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getDiscoverySplashHash ()Ljava/lang/String; - public final fun getDiscoverySplashUrl (Ldev/kord/rest/Image$Format;)Ljava/lang/String; + public final synthetic fun getDiscoverySplashUrl (Ldev/kord/rest/Image$Format;)Ljava/lang/String; public final fun getEmbedChannel (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getEmoji (Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getEmojiIds ()Ljava/util/Set; @@ -6126,9 +6159,10 @@ public final class dev/kord/core/entity/Guild : dev/kord/core/behavior/GuildBeha public fun getGateway ()Ldev/kord/gateway/Gateway; public fun getGuildScheduledEvent (Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun getGuildScheduledEventOrNull (Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getIcon (Ldev/kord/rest/Image$Format;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getIcon ()Ldev/kord/core/entity/Asset; + public final synthetic fun getIcon (Ldev/kord/rest/Image$Format;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getIconHash ()Ljava/lang/String; - public final fun getIconUrl (Ldev/kord/rest/Image$Format;)Ljava/lang/String; + public final synthetic fun getIconUrl (Ldev/kord/rest/Image$Format;)Ljava/lang/String; public fun getId ()Ldev/kord/common/entity/Snowflake; public fun getIntegrations ()Lkotlinx/coroutines/flow/Flow; public fun getInvite (Ljava/lang/String;ZZLdev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -6176,10 +6210,13 @@ public final class dev/kord/core/entity/Guild : dev/kord/core/behavior/GuildBeha public final fun getRulesChannel ()Ldev/kord/core/behavior/channel/TopGuildMessageChannelBehavior; public final fun getRulesChannel (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getRulesChannelId ()Ldev/kord/common/entity/Snowflake; + public final fun getSafetyAlertsChannel ()Ldev/kord/core/behavior/channel/TextChannelBehavior; + public final fun getSafetyAlertsChannelId ()Ldev/kord/common/entity/Snowflake; public fun getScheduledEvents ()Lkotlinx/coroutines/flow/Flow; - public final fun getSplash (Ldev/kord/rest/Image$Format;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getSplash ()Ldev/kord/core/entity/Asset; + public final synthetic fun getSplash (Ldev/kord/rest/Image$Format;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getSplashHash ()Ljava/lang/String; - public final fun getSplashUrl (Ldev/kord/rest/Image$Format;)Ljava/lang/String; + public final synthetic fun getSplashUrl (Ldev/kord/rest/Image$Format;)Ljava/lang/String; public final fun getStageInstances ()Ljava/util/Set; public fun getSticker (Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun getStickerOrNull (Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -6233,7 +6270,8 @@ public final class dev/kord/core/entity/GuildEmoji : dev/kord/core/entity/Emoji, public final fun getData ()Ldev/kord/core/cache/data/EmojiData; public final fun getGuildId ()Ldev/kord/common/entity/Snowflake; public fun getId ()Ldev/kord/common/entity/Snowflake; - public final fun getImage ()Ldev/kord/core/entity/Icon; + public final fun getImage ()Ldev/kord/core/entity/Asset; + public final synthetic fun getImage ()Ldev/kord/core/entity/Icon; public fun getKord ()Ldev/kord/core/Kord; public final fun getMember ()Ldev/kord/core/behavior/MemberBehavior; public final fun getMember (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -6364,6 +6402,7 @@ public final class dev/kord/core/entity/GuildScheduledEvent : dev/kord/core/beha public fun getGuildId ()Ldev/kord/common/entity/Snowflake; public final fun getGuildOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun getId ()Ldev/kord/common/entity/Snowflake; + public final fun getImage ()Ldev/kord/core/entity/Asset; public final fun getImageHash ()Ljava/lang/String; public fun getKord ()Ldev/kord/core/Kord; public fun getMembers ()Lkotlinx/coroutines/flow/Flow; @@ -6559,12 +6598,15 @@ public final class dev/kord/core/entity/Member : dev/kord/core/entity/User, dev/ public fun fetchMemberOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getCommunicationDisabledUntil ()Lkotlinx/datetime/Instant; public final fun getDisplayName ()Ljava/lang/String; + public final fun getEffectiveName ()Ljava/lang/String; public fun getGuild ()Ldev/kord/core/behavior/GuildBehavior; public fun getGuild (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun getGuildId ()Ldev/kord/common/entity/Snowflake; public fun getGuildOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getJoinedAt ()Lkotlinx/datetime/Instant; - public final fun getMemberAvatar ()Ldev/kord/core/entity/Icon; + public final fun getMemberAvatar ()Ldev/kord/core/entity/Asset; + public final synthetic fun getMemberAvatar ()Ldev/kord/core/entity/Icon; + public final fun getMemberAvatarHash ()Ljava/lang/String; public final fun getMemberData ()Ldev/kord/core/cache/data/MemberData; public final fun getNickname ()Ljava/lang/String; public final fun getPermissions (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -6722,8 +6764,10 @@ public final class dev/kord/core/entity/PartialGuild : dev/kord/core/behavior/Gu public fun getAutoModerationRules ()Lkotlinx/coroutines/flow/Flow; public fun getBan (Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun getBanOrNull (Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getBanner (Ldev/kord/rest/Image$Format;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getBannerUrl (Ldev/kord/rest/Image$Format;)Ljava/lang/String; + public final fun getBanner ()Ldev/kord/core/entity/Asset; + public final synthetic fun getBanner (Ldev/kord/rest/Image$Format;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getBannerHash ()Ljava/lang/String; + public final synthetic fun getBannerUrl (Ldev/kord/rest/Image$Format;)Ljava/lang/String; public fun getBans ()Lkotlinx/coroutines/flow/Flow; public fun getCachedThreads ()Lkotlinx/coroutines/flow/Flow; public fun getChannel (Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -6731,17 +6775,18 @@ public final class dev/kord/core/entity/PartialGuild : dev/kord/core/behavior/Gu public fun getChannels ()Lkotlinx/coroutines/flow/Flow; public final fun getData ()Ldev/kord/core/cache/data/PartialGuildData; public final fun getDescription ()Ljava/lang/String; - public final fun getDiscoverySplash (Ldev/kord/rest/Image$Format;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getDiscoverySplashUrl (Ldev/kord/rest/Image$Format;)Ljava/lang/String; + public final synthetic fun getDiscoverySplash (Ldev/kord/rest/Image$Format;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final synthetic fun getDiscoverySplashUrl (Ldev/kord/rest/Image$Format;)Ljava/lang/String; public fun getEmojis ()Lkotlinx/coroutines/flow/Flow; public fun getGateway ()Ldev/kord/gateway/Gateway; public final fun getGuild (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getGuildOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun getGuildScheduledEvent (Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun getGuildScheduledEventOrNull (Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getIcon (Ldev/kord/rest/Image$Format;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getIcon ()Ldev/kord/core/entity/Asset; + public final synthetic fun getIcon (Ldev/kord/rest/Image$Format;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getIconHash ()Ljava/lang/String; - public final fun getIconUrl (Ldev/kord/rest/Image$Format;)Ljava/lang/String; + public final synthetic fun getIconUrl (Ldev/kord/rest/Image$Format;)Ljava/lang/String; public fun getId ()Ldev/kord/common/entity/Snowflake; public fun getIntegrations ()Lkotlinx/coroutines/flow/Flow; public fun getInvite (Ljava/lang/String;ZZLdev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -6767,6 +6812,7 @@ public final class dev/kord/core/entity/PartialGuild : dev/kord/core/behavior/Gu public fun getRoleOrNull (Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun getRoles ()Lkotlinx/coroutines/flow/Flow; public fun getScheduledEvents ()Lkotlinx/coroutines/flow/Flow; + public final fun getSplash ()Ldev/kord/core/entity/Asset; public final fun getSplashHash ()Ljava/lang/String; public fun getSticker (Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun getStickerOrNull (Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -6948,7 +6994,9 @@ public final class dev/kord/core/entity/Role : dev/kord/core/behavior/RoleBehavi public fun getGuild ()Ldev/kord/core/behavior/GuildBehavior; public fun getGuildId ()Ldev/kord/common/entity/Snowflake; public final fun getHoisted ()Z - public final fun getIcon ()Ldev/kord/core/entity/Icon; + public final fun getIcon ()Ldev/kord/core/entity/Asset; + public final synthetic fun getIcon ()Ldev/kord/core/entity/Icon; + public final fun getIconHash ()Ljava/lang/String; public fun getId ()Ldev/kord/common/entity/Snowflake; public fun getKord ()Ldev/kord/core/Kord; public final fun getManaged ()Z @@ -7026,6 +7074,7 @@ public class dev/kord/core/entity/Sticker : dev/kord/core/entity/KordEntity { public fun (Ldev/kord/core/cache/data/StickerData;Ldev/kord/core/Kord;)V public fun compareTo (Ldev/kord/core/entity/Entity;)I public synthetic fun compareTo (Ljava/lang/Object;)I + public final fun getAsset ()Ldev/kord/core/entity/Asset; public final fun getAvailable ()Z public final fun getData ()Ldev/kord/core/cache/data/StickerData; public final fun getDescription ()Ljava/lang/String; @@ -7044,6 +7093,7 @@ public final class dev/kord/core/entity/StickerItem : dev/kord/core/entity/KordE public synthetic fun (Ldev/kord/core/cache/data/StickerItemData;Ldev/kord/core/Kord;Ldev/kord/core/supplier/EntitySupplier;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public fun compareTo (Ldev/kord/core/entity/Entity;)I public synthetic fun compareTo (Ljava/lang/Object;)I + public final fun getAsset ()Ldev/kord/core/entity/Asset; public final fun getData ()Ldev/kord/core/cache/data/StickerItemData; public final fun getFormatType ()Ldev/kord/common/entity/MessageStickerType; public fun getId ()Ldev/kord/common/entity/Snowflake; @@ -7059,6 +7109,8 @@ public final class dev/kord/core/entity/StickerPack : dev/kord/core/entity/KordE public fun (Ldev/kord/core/cache/data/StickerPackData;Ldev/kord/core/Kord;)V public fun compareTo (Ldev/kord/core/entity/Entity;)I public synthetic fun compareTo (Ljava/lang/Object;)I + public final fun getBanner ()Ldev/kord/core/entity/Asset; + public final fun getBannerId ()Ldev/kord/common/entity/Snowflake; public final fun getCoverStickerId ()Ldev/kord/common/entity/Snowflake; public final fun getData ()Ldev/kord/core/cache/data/StickerPackData; public final fun getDescription ()Ljava/lang/String; @@ -7080,7 +7132,9 @@ public final class dev/kord/core/entity/Team : dev/kord/core/entity/KordEntity, public fun compareTo (Ldev/kord/core/entity/Entity;)I public synthetic fun compareTo (Ljava/lang/Object;)I public final fun getData ()Ldev/kord/core/cache/data/TeamData; - public final fun getIcon ()Ljava/lang/String; + public final fun getIcon ()Ldev/kord/core/entity/Asset; + public final synthetic fun getIcon ()Ljava/lang/String; + public final fun getIconHash ()Ljava/lang/String; public fun getId ()Ldev/kord/common/entity/Snowflake; public fun getKord ()Ldev/kord/core/Kord; public final fun getMembers ()Ljava/util/List; @@ -7139,13 +7193,19 @@ public class dev/kord/core/entity/User : dev/kord/core/behavior/UserBehavior { public fun fetchUser (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun fetchUserOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getAccentColor ()Ldev/kord/common/Color; - public final fun getAvatar ()Ldev/kord/core/entity/Icon; - public final fun getBannerUrl (Ldev/kord/rest/Image$Format;)Ljava/lang/String; + public final fun getAvatar ()Ldev/kord/core/entity/Asset; + public final synthetic fun getAvatar ()Ldev/kord/core/entity/Icon; + public final fun getAvatarHash ()Ljava/lang/String; + public final fun getBanner ()Ldev/kord/core/entity/Asset; + public final fun getBannerHash ()Ljava/lang/String; + public final synthetic fun getBannerUrl (Ldev/kord/rest/Image$Format;)Ljava/lang/String; public final fun getData ()Ldev/kord/core/cache/data/UserData; - public final fun getDefaultAvatar ()Ldev/kord/core/entity/Icon; + public final fun getDefaultAvatar ()Ldev/kord/core/entity/Asset; + public final synthetic fun getDefaultAvatar ()Ldev/kord/core/entity/Icon; public final fun getDiscriminator ()Ljava/lang/String; public fun getDmChannel (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun getDmChannelOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getGlobalName ()Ljava/lang/String; public fun getId ()Ldev/kord/common/entity/Snowflake; public fun getKord ()Ldev/kord/core/Kord; public fun getMention ()Ljava/lang/String; @@ -7187,6 +7247,10 @@ public final class dev/kord/core/entity/User$Avatar : dev/kord/core/KordObject { public fun toString ()Ljava/lang/String; } +public final class dev/kord/core/entity/UserKt { + public static final fun getEffectiveName (Ldev/kord/core/entity/User;)Ljava/lang/String; +} + public final class dev/kord/core/entity/VoiceState : dev/kord/core/KordObject, dev/kord/core/entity/Strategizable { public fun (Ldev/kord/core/cache/data/VoiceStateData;Ldev/kord/core/Kord;Ldev/kord/core/supplier/EntitySupplier;)V public synthetic fun (Ldev/kord/core/cache/data/VoiceStateData;Ldev/kord/core/Kord;Ldev/kord/core/supplier/EntitySupplier;ILkotlin/jvm/internal/DefaultConstructorMarker;)V @@ -7311,6 +7375,19 @@ public final class dev/kord/core/entity/application/ApplicationCommandPermission public final fun getPermissions ()Lkotlinx/coroutines/flow/Flow; } +public final class dev/kord/core/entity/application/ApplicationRoleConnectionMetadata : dev/kord/core/KordObject { + public fun (Ldev/kord/common/entity/DiscordApplicationRoleConnectionMetadata;Ldev/kord/core/Kord;)V + public final fun getData ()Ldev/kord/common/entity/DiscordApplicationRoleConnectionMetadata; + public final fun getDescription ()Ljava/lang/String; + public final fun getDescriptionLocalizations ()Ljava/util/Map; + public final fun getKey ()Ljava/lang/String; + public fun getKord ()Ldev/kord/core/Kord; + public final fun getName ()Ljava/lang/String; + public final fun getNameLocalizations ()Ljava/util/Map; + public final fun getType ()Ldev/kord/common/entity/ApplicationRoleConnectionMetadataType; + public fun toString ()Ljava/lang/String; +} + public abstract interface class dev/kord/core/entity/application/ChatInputCommandCommand : dev/kord/core/behavior/ChatInputCommandBehavior, dev/kord/core/entity/application/ApplicationCommand { public abstract fun getDescription ()Ljava/lang/String; public abstract fun getDescriptionLocalizations ()Ljava/util/Map; @@ -7686,6 +7763,7 @@ public final class dev/kord/core/entity/automoderation/MentionSpamAutoModeration public final fun getMentionLimit ()I public fun getTriggerType ()Ldev/kord/common/entity/AutoModerationRuleTriggerType$MentionSpam; public synthetic fun getTriggerType ()Ldev/kord/common/entity/AutoModerationRuleTriggerType; + public final fun isMentionRaidProtectionEnabled ()Z public fun toString ()Ljava/lang/String; public synthetic fun withStrategy (Ldev/kord/core/supplier/EntitySupplyStrategy;)Ldev/kord/core/behavior/automoderation/AutoModerationRuleBehavior; public synthetic fun withStrategy (Ldev/kord/core/supplier/EntitySupplyStrategy;)Ldev/kord/core/behavior/automoderation/MentionSpamAutoModerationRuleBehavior; @@ -7998,7 +8076,6 @@ public abstract interface class dev/kord/core/entity/channel/GuildMessageChannel public final class dev/kord/core/entity/channel/GuildMessageChannel$DefaultImpls { public static fun asChannel (Ldev/kord/core/entity/channel/GuildMessageChannel;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun asChannelOrNull (Ldev/kord/core/entity/channel/GuildMessageChannel;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun bulkDelete (Ldev/kord/core/entity/channel/GuildMessageChannel;Ljava/lang/Iterable;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun bulkDelete (Ldev/kord/core/entity/channel/GuildMessageChannel;Ljava/lang/Iterable;ZLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun compareTo (Ldev/kord/core/entity/channel/GuildMessageChannel;Ldev/kord/core/entity/Entity;)I public static fun createMessage (Ldev/kord/core/entity/channel/GuildMessageChannel;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -8074,7 +8151,6 @@ public final class dev/kord/core/entity/channel/NewsChannel : dev/kord/core/beha public fun addOverwrite (Ldev/kord/core/entity/PermissionOverwrite;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun asChannel (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun asChannelOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public synthetic fun bulkDelete (Ljava/lang/Iterable;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun bulkDelete (Ljava/lang/Iterable;ZLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun compareTo (Ldev/kord/core/entity/Entity;)I public synthetic fun compareTo (Ljava/lang/Object;)I @@ -8122,9 +8198,7 @@ public final class dev/kord/core/entity/channel/NewsChannel : dev/kord/core/beha public fun getType ()Ldev/kord/common/entity/ChannelType; public fun getWebhooks ()Lkotlinx/coroutines/flow/Flow; public fun hashCode ()I - public fun startPublicThread (Ljava/lang/String;Ldev/kord/common/entity/ArchiveDuration;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun startPublicThread (Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public fun startPublicThreadWithMessage (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/ArchiveDuration;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun startPublicThreadWithMessage (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun toString ()Ljava/lang/String; public fun type (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -8183,7 +8257,6 @@ public final class dev/kord/core/entity/channel/StageChannel : dev/kord/core/beh public fun addOverwrite (Ldev/kord/core/entity/PermissionOverwrite;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun asChannel (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun asChannelOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public synthetic fun bulkDelete (Ljava/lang/Iterable;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun bulkDelete (Ljava/lang/Iterable;ZLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun compareTo (Ldev/kord/core/entity/Entity;)I public synthetic fun compareTo (Ljava/lang/Object;)I @@ -8262,7 +8335,6 @@ public final class dev/kord/core/entity/channel/TextChannel : dev/kord/core/beha public fun addOverwrite (Ldev/kord/core/entity/PermissionOverwrite;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun asChannel (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun asChannelOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public synthetic fun bulkDelete (Ljava/lang/Iterable;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun bulkDelete (Ljava/lang/Iterable;ZLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun compareTo (Ldev/kord/core/entity/Entity;)I public synthetic fun compareTo (Ljava/lang/Object;)I @@ -8314,11 +8386,8 @@ public final class dev/kord/core/entity/channel/TextChannel : dev/kord/core/beha public fun getWebhooks ()Lkotlinx/coroutines/flow/Flow; public fun hashCode ()I public final fun isNsfw ()Z - public fun startPrivateThread (Ljava/lang/String;Ldev/kord/common/entity/ArchiveDuration;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun startPrivateThread (Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public fun startPublicThread (Ljava/lang/String;Ldev/kord/common/entity/ArchiveDuration;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun startPublicThread (Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public fun startPublicThreadWithMessage (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Ldev/kord/common/entity/ArchiveDuration;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun startPublicThreadWithMessage (Ldev/kord/common/entity/Snowflake;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun toString ()Ljava/lang/String; public fun type (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -8424,7 +8493,6 @@ public final class dev/kord/core/entity/channel/TopGuildMessageChannel$DefaultIm public static fun addOverwrite (Ldev/kord/core/entity/channel/TopGuildMessageChannel;Ldev/kord/core/entity/PermissionOverwrite;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun asChannel (Ldev/kord/core/entity/channel/TopGuildMessageChannel;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun asChannelOrNull (Ldev/kord/core/entity/channel/TopGuildMessageChannel;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun bulkDelete (Ldev/kord/core/entity/channel/TopGuildMessageChannel;Ljava/lang/Iterable;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun bulkDelete (Ldev/kord/core/entity/channel/TopGuildMessageChannel;Ljava/lang/Iterable;ZLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun compareTo (Ldev/kord/core/entity/channel/TopGuildMessageChannel;Ldev/kord/core/entity/Entity;)I public static fun createMessage (Ldev/kord/core/entity/channel/TopGuildMessageChannel;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -8474,7 +8542,6 @@ public final class dev/kord/core/entity/channel/VoiceChannel : dev/kord/core/beh public fun addOverwrite (Ldev/kord/core/entity/PermissionOverwrite;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun asChannel (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun asChannelOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public synthetic fun bulkDelete (Ljava/lang/Iterable;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun bulkDelete (Ljava/lang/Iterable;ZLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun compareTo (Ldev/kord/core/entity/Entity;)I public synthetic fun compareTo (Ljava/lang/Object;)I @@ -8597,7 +8664,6 @@ public final class dev/kord/core/entity/channel/thread/NewsChannelThread : dev/k public fun addUser (Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun asChannel (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun asChannelOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public synthetic fun bulkDelete (Ljava/lang/Iterable;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun bulkDelete (Ljava/lang/Iterable;ZLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun compareTo (Ldev/kord/core/entity/Entity;)I public synthetic fun compareTo (Ljava/lang/Object;)I @@ -8678,7 +8744,6 @@ public final class dev/kord/core/entity/channel/thread/TextChannelThread : dev/k public fun addUser (Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun asChannel (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun asChannelOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public synthetic fun bulkDelete (Ljava/lang/Iterable;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun bulkDelete (Ljava/lang/Iterable;ZLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun compareTo (Ldev/kord/core/entity/Entity;)I public synthetic fun compareTo (Ljava/lang/Object;)I @@ -8782,7 +8847,6 @@ public final class dev/kord/core/entity/channel/thread/ThreadChannel$DefaultImpl public static fun addUser (Ldev/kord/core/entity/channel/thread/ThreadChannel;Ldev/kord/common/entity/Snowflake;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun asChannel (Ldev/kord/core/entity/channel/thread/ThreadChannel;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun asChannelOrNull (Ldev/kord/core/entity/channel/thread/ThreadChannel;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun bulkDelete (Ldev/kord/core/entity/channel/thread/ThreadChannel;Ljava/lang/Iterable;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun bulkDelete (Ldev/kord/core/entity/channel/thread/ThreadChannel;Ljava/lang/Iterable;ZLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static fun compareTo (Ldev/kord/core/entity/channel/thread/ThreadChannel;Ldev/kord/core/entity/Entity;)I public static fun createMessage (Ldev/kord/core/entity/channel/thread/ThreadChannel;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -8932,17 +8996,15 @@ public final class dev/kord/core/entity/component/RoleSelectComponent : dev/kord public synthetic fun getType ()Ldev/kord/common/entity/ComponentType; } -public class dev/kord/core/entity/component/SelectMenuComponent : dev/kord/core/entity/component/Component { - public fun (Ldev/kord/core/cache/data/ComponentData;)V +public abstract class dev/kord/core/entity/component/SelectMenuComponent : dev/kord/core/entity/component/Component { + public synthetic fun (Ldev/kord/core/cache/data/ComponentData;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public fun equals (Ljava/lang/Object;)Z public final fun getCustomId ()Ljava/lang/String; public fun getData ()Ldev/kord/core/cache/data/ComponentData; public final fun getDisabled ()Z public final fun getMaxValues ()I public final fun getMinValues ()I - public final fun getOptions ()Ljava/util/List; public final fun getPlaceholder ()Ljava/lang/String; - public synthetic fun getType ()Ldev/kord/common/entity/ComponentType$SelectMenu; public fun getType ()Ldev/kord/common/entity/ComponentType; public fun hashCode ()I public fun toString ()Ljava/lang/String; @@ -8967,6 +9029,7 @@ public final class dev/kord/core/entity/component/SelectOption { public final class dev/kord/core/entity/component/StringSelectComponent : dev/kord/core/entity/component/SelectMenuComponent { public fun (Ldev/kord/core/cache/data/ComponentData;)V + public final fun getOptions ()Ljava/util/List; public fun getType ()Ldev/kord/common/entity/ComponentType$StringSelect; public synthetic fun getType ()Ldev/kord/common/entity/ComponentType; } @@ -10824,7 +10887,7 @@ public final class dev/kord/core/event/automoderation/data/AutoModerationActionE public final fun getUserId ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/event/automoderation/data/AutoModerationActionExecutionEventData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/event/automoderation/data/AutoModerationActionExecutionEventData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/event/automoderation/data/AutoModerationActionExecutionEventData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -11116,7 +11179,6 @@ public final class dev/kord/core/event/channel/TypingStartEvent : dev/kord/core/ public final fun getData ()Ldev/kord/core/event/channel/data/TypingStartEventData; public fun getGateway ()Ldev/kord/gateway/Gateway; public final fun getGuild ()Ldev/kord/core/behavior/GuildBehavior; - public final fun getGuild (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getGuildId ()Ldev/kord/common/entity/Snowflake; public final fun getGuildOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun getKord ()Ldev/kord/core/Kord; @@ -11214,7 +11276,7 @@ public final class dev/kord/core/event/channel/data/ChannelPinsUpdateEventData { public final fun getLastPinTimestamp ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/event/channel/data/ChannelPinsUpdateEventData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/event/channel/data/ChannelPinsUpdateEventData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/event/channel/data/ChannelPinsUpdateEventData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -11253,7 +11315,7 @@ public final class dev/kord/core/event/channel/data/TypingStartEventData { public final fun getUserId ()Ldev/kord/common/entity/Snowflake; public fun hashCode ()I public fun toString ()Ljava/lang/String; - public static final fun write$Self (Ldev/kord/core/event/channel/data/TypingStartEventData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V + public static final synthetic fun write$Self (Ldev/kord/core/event/channel/data/TypingStartEventData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V } public final class dev/kord/core/event/channel/data/TypingStartEventData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { @@ -11373,7 +11435,8 @@ public final class dev/kord/core/event/channel/thread/ThreadListSyncEvent : dev/ public synthetic fun (Ldev/kord/core/cache/data/ThreadListSyncData;Ldev/kord/core/Kord;ILjava/lang/Object;Ldev/kord/core/supplier/EntitySupplier;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun getChannelBehaviors ()Ljava/util/List; public final fun getChannelIds ()Ljava/util/List; - public final fun getChannels (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getChannels ()Lkotlinx/coroutines/flow/Flow; + public final synthetic fun getChannels (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun getCustomContext ()Ljava/lang/Object; public final fun getData ()Ldev/kord/core/cache/data/ThreadListSyncData; public fun getGateway ()Ldev/kord/gateway/Gateway; @@ -11545,7 +11608,8 @@ public final class dev/kord/core/event/gateway/ReadyEvent : dev/kord/core/event/ public final fun getGatewayVersion ()I public final fun getGuildIds ()Ljava/util/Set; public final fun getGuilds ()Ljava/util/Set; - public final fun getGuilds (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getGuilds ()Lkotlinx/coroutines/flow/Flow; + public final synthetic fun getGuilds (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun getKord ()Ldev/kord/core/Kord; public final fun getResumeGatewayUrl ()Ljava/lang/String; public final fun getSelf ()Ldev/kord/core/entity/User; @@ -12607,7 +12671,6 @@ public final class dev/kord/core/event/message/MessageBulkDeleteEvent : dev/kord public fun getCustomContext ()Ljava/lang/Object; public fun getGateway ()Ldev/kord/gateway/Gateway; public final fun getGuild ()Ldev/kord/core/behavior/GuildBehavior; - public final fun getGuild (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getGuildId ()Ldev/kord/common/entity/Snowflake; public final fun getGuildOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun getKord ()Ldev/kord/core/Kord; @@ -12625,7 +12688,6 @@ public final class dev/kord/core/event/message/MessageCreateEvent : dev/kord/cor public synthetic fun (Ldev/kord/core/entity/Message;Ldev/kord/common/entity/Snowflake;Ldev/kord/core/entity/Member;ILjava/lang/Object;Ldev/kord/core/supplier/EntitySupplier;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public fun getCustomContext ()Ljava/lang/Object; public fun getGateway ()Ldev/kord/gateway/Gateway; - public final fun getGuild (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getGuildId ()Ldev/kord/common/entity/Snowflake; public final fun getGuildOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun getKord ()Ldev/kord/core/Kord; @@ -12648,7 +12710,6 @@ public final class dev/kord/core/event/message/MessageDeleteEvent : dev/kord/cor public fun getCustomContext ()Ljava/lang/Object; public fun getGateway ()Ldev/kord/gateway/Gateway; public final fun getGuild ()Ldev/kord/core/behavior/GuildBehavior; - public final fun getGuild (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getGuildId ()Ldev/kord/common/entity/Snowflake; public final fun getGuildOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun getKord ()Ldev/kord/core/Kord; @@ -12693,7 +12754,6 @@ public final class dev/kord/core/event/message/ReactionAddEvent : dev/kord/core/ public final fun getEmoji ()Ldev/kord/core/entity/ReactionEmoji; public fun getGateway ()Ldev/kord/gateway/Gateway; public final fun getGuild ()Ldev/kord/core/behavior/GuildBehavior; - public final fun getGuild (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getGuildId ()Ldev/kord/common/entity/Snowflake; public final fun getGuildOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun getKord ()Ldev/kord/core/Kord; @@ -12724,7 +12784,6 @@ public final class dev/kord/core/event/message/ReactionRemoveAllEvent : dev/kord public fun getCustomContext ()Ljava/lang/Object; public fun getGateway ()Ldev/kord/gateway/Gateway; public final fun getGuild ()Ldev/kord/core/behavior/GuildBehavior; - public final fun getGuild (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getGuildId ()Ldev/kord/common/entity/Snowflake; public final fun getGuildOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun getKord ()Ldev/kord/core/Kord; @@ -12777,7 +12836,6 @@ public final class dev/kord/core/event/message/ReactionRemoveEvent : dev/kord/co public final fun getEmoji ()Ldev/kord/core/entity/ReactionEmoji; public fun getGateway ()Ldev/kord/gateway/Gateway; public final fun getGuild ()Ldev/kord/core/behavior/GuildBehavior; - public final fun getGuild (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getGuildId ()Ldev/kord/common/entity/Snowflake; public final fun getGuildOrNull (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun getKord ()Ldev/kord/core/Kord; @@ -13024,7 +13082,7 @@ public abstract class dev/kord/core/live/AbstractLiveKordEntity : dev/kord/core/ public fun compareTo (Ldev/kord/core/entity/Entity;)I public synthetic fun compareTo (Ljava/lang/Object;)I protected abstract fun filter (Ldev/kord/core/event/Event;)Z - public fun getCoroutineContext ()Lkotlin/coroutines/CoroutineContext; + public final fun getCoroutineContext ()Lkotlin/coroutines/CoroutineContext; public synthetic fun getEvents ()Lkotlinx/coroutines/flow/Flow; public final fun getEvents ()Lkotlinx/coroutines/flow/SharedFlow; public final fun getKord ()Ldev/kord/core/Kord; diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 58bca499628c..ac5deb385105 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -6,11 +6,11 @@ plugins { kotlin { js { nodejs { - testTask { + testTask(Action { useMocha { timeout = "10000" // KordEventDropTest is too slow for default 2 seconds timeout } - } + }) } } diff --git a/core/live-tests/src/commonTest/kotlin/regression/CacheMissRegression.kt b/core/live-tests/src/commonTest/kotlin/regression/CacheMissRegression.kt index e547779900c6..ae948c06fbb3 100644 --- a/core/live-tests/src/commonTest/kotlin/regression/CacheMissRegression.kt +++ b/core/live-tests/src/commonTest/kotlin/regression/CacheMissRegression.kt @@ -46,9 +46,9 @@ private val parser = Json { object FakeGateway : Gateway { - val deferred = CompletableDeferred() + private val deferred = CompletableDeferred() - override val events: SharedFlow = MutableSharedFlow() + override val events: SharedFlow = MutableSharedFlow() override val ping: StateFlow = MutableStateFlow(null) @@ -66,7 +66,7 @@ object FakeGateway : Gateway { override val coroutineContext: CoroutineContext = SupervisorJob() + EmptyCoroutineContext } -class CrashingHandler(val client: HttpClient, override val token: String) : RequestHandler { +class CrashingHandler(private val client: HttpClient, override val token: String) : RequestHandler { override suspend fun handle(request: Request): R { if (request.route != Route.CurrentUserGet) throw IllegalStateException("shouldn't do a request") val response = client.request { diff --git a/core/src/commonMain/kotlin/ClientResources.kt b/core/src/commonMain/kotlin/ClientResources.kt index 0ecf5ed6ab22..5964dd1fb68c 100644 --- a/core/src/commonMain/kotlin/ClientResources.kt +++ b/core/src/commonMain/kotlin/ClientResources.kt @@ -4,7 +4,6 @@ import dev.kord.common.entity.Snowflake import dev.kord.core.supplier.EntitySupplyStrategy import dev.kord.gateway.builder.Shards import io.ktor.client.* -import kotlin.DeprecationLevel.HIDDEN /** * The resources for the Kord Instance. @@ -24,22 +23,6 @@ public class ClientResources( public val httpClient: HttpClient, public val defaultStrategy: EntitySupplyStrategy<*>, ) { - @Deprecated( - "Specify maxConcurrency. It can be obtained by calling the Route.GatewayBotGet endpoint.", - ReplaceWith( - "ClientResources(token, applicationId, shards, maxConcurrency = 1 /* can be obtained by calling the " + - "Route.GatewayBotGet endpoint */, httpClient, defaultStrategy)" - ), - level = HIDDEN, - ) - public constructor( - token: String, - applicationId: Snowflake, - shards: Shards, - httpClient: HttpClient, - defaultStrategy: EntitySupplyStrategy<*>, - ) : this(token, applicationId, shards, maxConcurrency = 1, httpClient, defaultStrategy) - override fun toString(): String = "ClientResources(token=hunter2, applicationId=$applicationId, shards=$shards, " + "maxConcurrency=$maxConcurrency, httpClient=$httpClient, defaultStrategy=$defaultStrategy)" } diff --git a/core/src/commonMain/kotlin/Kord.kt b/core/src/commonMain/kotlin/Kord.kt index 294506187d84..55dbdfc756d5 100644 --- a/core/src/commonMain/kotlin/Kord.kt +++ b/core/src/commonMain/kotlin/Kord.kt @@ -25,6 +25,7 @@ import dev.kord.core.supplier.* import dev.kord.gateway.Gateway import dev.kord.gateway.builder.LoginBuilder import dev.kord.gateway.builder.PresenceBuilder +import dev.kord.rest.builder.application.ApplicationRoleConnectionMetadataRecordsBuilder import dev.kord.rest.builder.guild.GuildCreateBuilder import dev.kord.rest.builder.interaction.* import dev.kord.rest.builder.user.CurrentUserModifyBuilder @@ -34,7 +35,7 @@ import kotlinx.coroutines.* import kotlinx.coroutines.flow.* import mu.KLogger import mu.KotlinLogging -import kotlin.DeprecationLevel.HIDDEN +import kotlin.DeprecationLevel.ERROR import kotlin.contracts.InvocationKind import kotlin.contracts.contract import kotlin.coroutines.CoroutineContext @@ -160,6 +161,30 @@ public class Kord( */ public suspend fun getApplicationInfo(): Application = with(EntitySupplyStrategy.rest).getApplicationInfo() + /** + * Requests the [ApplicationRoleConnectionMetadata] objects for this [Application]. + * + * @throws RestRequestException if something went wrong during the request. + */ + public suspend fun getApplicationRoleConnectionMetadataRecords(): List = + rest.applicationRoleConnectionMetadata + .getApplicationRoleConnectionMetadataRecords(selfId) + .map { ApplicationRoleConnectionMetadata(data = it, kord = this) } + + /** + * Requests to update the [ApplicationRoleConnectionMetadata] objects for this [Application]. + * + * @throws RestRequestException if something went wrong during the request. + */ + public suspend inline fun updateApplicationRoleConnectionMetadataRecords( + builder: ApplicationRoleConnectionMetadataRecordsBuilder.() -> Unit, + ): List { + contract { callsInPlace(builder, InvocationKind.EXACTLY_ONCE) } + return rest.applicationRoleConnectionMetadata + .updateApplicationRoleConnectionMetadataRecords(selfId, builder) + .map { ApplicationRoleConnectionMetadata(data = it, kord = this) } + } + /** * Requests to create a new Guild configured through the [builder]. * @@ -234,29 +259,23 @@ public class Kord( ): Guild? = strategy.supply(this).getGuildOrNull(id) /** - * Requests the [Guild] with the given [id], returns `null` when the guild isn't present. + * Requests the [Guild] with the given [id]. * * @throws RequestException if something went wrong while retrieving the guild. + * @throws EntityNotFoundException if the guild is null. */ - @Deprecated( - "This function has an inconsistent name for its nullable return type and has been deprecated in favour of " + - "'getGuildOrNull()'.", - ReplaceWith("this.getGuildOrNull(id, strategy)"), - level = HIDDEN, - ) public suspend fun getGuild( id: Snowflake, strategy: EntitySupplyStrategy<*> = resources.defaultStrategy, - ): Guild? = strategy.supply(this).getGuildOrNull(id) + ): Guild = strategy.supply(this).getGuild(id) /** * Requests the [Guild] with the given [id]. * - * This will be renamed to `getGuild` once the [deprecated function][getGuild] is removed. - * * @throws RequestException if something went wrong while retrieving the guild. * @throws EntityNotFoundException if the guild is null. */ + @Deprecated("Renamed to getGuild", ReplaceWith("this.getGuild(id, strategy)"), level = ERROR) public suspend fun getGuildOrThrow( id: Snowflake, strategy: EntitySupplyStrategy<*> = resources.defaultStrategy, @@ -393,15 +412,10 @@ public class Kord( gateway.sendAll(status) } - override fun equals(other: Any?): Boolean { - val kord = other as? Kord ?: return false - - return resources.token == kord.resources.token - } - - override fun toString(): String { - return "Kord(resources=$resources, cache=$cache, gateway=$gateway, rest=$rest, selfId=$selfId)" - } + override fun equals(other: Any?): Boolean = other is Kord && this.resources.token == other.resources.token + override fun hashCode(): Int = resources.token.hashCode() + override fun toString(): String = + "Kord(resources=$resources, cache=$cache, gateway=$gateway, rest=$rest, selfId=$selfId)" public companion object { diff --git a/core/src/commonMain/kotlin/Util.kt b/core/src/commonMain/kotlin/Util.kt index 827510177165..38cd56962d94 100644 --- a/core/src/commonMain/kotlin/Util.kt +++ b/core/src/commonMain/kotlin/Util.kt @@ -1,7 +1,6 @@ package dev.kord.core import dev.kord.common.entity.Snowflake -import dev.kord.core.entity.KordEntity import dev.kord.core.entity.Message import dev.kord.core.entity.channel.thread.ThreadChannel import dev.kord.core.event.Event @@ -28,7 +27,6 @@ import kotlinx.datetime.Instant import kotlin.contracts.InvocationKind import kotlin.contracts.contract import kotlin.reflect.KClass -import kotlinx.coroutines.flow.firstOrNull as coroutinesFirstOrNull internal inline fun catchNotFound(block: () -> T): T? { contract { @@ -67,7 +65,7 @@ internal fun > Flow.sorted(): Flow = flow { * The flow's collection is cancelled when a match is found. */ internal suspend inline fun Flow.any(crossinline predicate: suspend (T) -> Boolean): Boolean = - coroutinesFirstOrNull { predicate(it) } != null + firstOrNull { predicate(it) } != null /** * The non-terminal operator that returns a new flow that will emit values of the second [flow] only after the first @@ -173,22 +171,6 @@ internal fun paginateForwards( request, ) -/** - * Selects the [Position.After] the youngest item in the batch. - */ -internal fun paginateForwards( - batchSize: Int, - start: Snowflake = Snowflake.min, - request: suspend (after: Position.After) -> Collection, -): Flow = paginate( - start, - batchSize, - itemSelector = youngestItem { it.id }, - idSelector = { it.id }, - directionSelector = Position::After, - request, -) - /** * Selects the [Position.Before] the oldest item in the batch. */ @@ -206,22 +188,6 @@ internal fun paginateBackwards( request, ) -/** - * Selects the [Position.Before] the oldest item in the batch. - */ -internal fun paginateBackwards( - batchSize: Int, - start: Snowflake = Snowflake.max, - request: suspend (before: Position.Before) -> Collection, -): Flow = paginate( - start, - batchSize, - itemSelector = oldestItem { it.id }, - idSelector = { it.id }, - directionSelector = Position::Before, - request, -) - /** * Paginates the [Collection] returned by [request] with [start] as an initial reference in time. * [instantSelector] is used to select the new reference to fetch from. diff --git a/core/src/commonMain/kotlin/behavior/GuildBehavior.kt b/core/src/commonMain/kotlin/behavior/GuildBehavior.kt index e7899b7ac8c6..d22531417050 100644 --- a/core/src/commonMain/kotlin/behavior/GuildBehavior.kt +++ b/core/src/commonMain/kotlin/behavior/GuildBehavior.kt @@ -54,7 +54,6 @@ import dev.kord.rest.request.RestRequestException import dev.kord.rest.service.* import kotlinx.coroutines.flow.* import kotlinx.datetime.Instant -import kotlin.contracts.InvocationKind import kotlin.contracts.InvocationKind.EXACTLY_ONCE import kotlin.contracts.contract @@ -91,7 +90,7 @@ public interface GuildBehavior : KordEntity, Strategizable { */ public val cachedThreads: Flow get() = kord.cache - .query { idEq(ChannelData::guildId, this@GuildBehavior.id) } + .query { idEq(ChannelData::guildId, this@GuildBehavior.id) } .asFlow() .mapNotNull { Channel.from(it, kord) as? ThreadChannel } @@ -139,7 +138,7 @@ public interface GuildBehavior : KordEntity, Strategizable { * This property is not resolvable through REST and will always use [Kord.cache] instead. */ public val presences: Flow - get() = kord.cache.query { idEq(PresenceData::guildId, id) } + get() = kord.cache.query { idEq(PresenceData::guildId, id) } .asFlow() .map { Presence(it, kord) } @@ -191,7 +190,7 @@ public interface GuildBehavior : KordEntity, Strategizable { */ public val voiceStates: Flow get() = kord.cache - .query { idEq(VoiceStateData::guildId, id) } + .query { idEq(VoiceStateData::guildId, id) } .asFlow() .map { VoiceState(it, kord) } @@ -695,7 +694,7 @@ public suspend inline fun GuildBehavior.createChatInputCommand( description: String, builder: ChatInputCreateBuilder.() -> Unit = {}, ): GuildChatInputCommand { - contract { callsInPlace(builder, InvocationKind.EXACTLY_ONCE) } + contract { callsInPlace(builder, EXACTLY_ONCE) } return kord.createGuildChatInputCommand(id, name, description, builder) } @@ -704,7 +703,7 @@ public suspend inline fun GuildBehavior.createMessageCommand( name: String, builder: MessageCommandCreateBuilder.() -> Unit = {}, ): GuildMessageCommand { - contract { callsInPlace(builder, InvocationKind.EXACTLY_ONCE) } + contract { callsInPlace(builder, EXACTLY_ONCE) } return kord.createGuildMessageCommand(id, name, builder) } @@ -713,7 +712,7 @@ public suspend inline fun GuildBehavior.createUserCommand( name: String, builder: UserCommandCreateBuilder.() -> Unit = {}, ): GuildUserCommand { - contract { callsInPlace(builder, InvocationKind.EXACTLY_ONCE) } + contract { callsInPlace(builder, EXACTLY_ONCE) } return kord.createGuildUserCommand(id, name, builder) } @@ -721,7 +720,7 @@ public suspend inline fun GuildBehavior.createUserCommand( public suspend inline fun GuildBehavior.createApplicationCommands( builder: GuildMultiApplicationCommandBuilder.() -> Unit ): Flow { - contract { callsInPlace(builder, InvocationKind.EXACTLY_ONCE) } + contract { callsInPlace(builder, EXACTLY_ONCE) } return kord.createGuildApplicationCommands(id, builder) } @@ -734,7 +733,7 @@ public suspend inline fun GuildBehavior.createApplicationCommands( */ public suspend inline fun GuildBehavior.edit(builder: GuildModifyBuilder.() -> Unit): Guild { contract { - callsInPlace(builder, InvocationKind.EXACTLY_ONCE) + callsInPlace(builder, EXACTLY_ONCE) } val response = kord.rest.guild.modifyGuild(id, builder) val data = GuildData.from(response) @@ -748,7 +747,7 @@ public suspend inline fun GuildBehavior.createEmoji( builder: EmojiCreateBuilder.() -> Unit = {} ): GuildEmoji { contract { - callsInPlace(builder, InvocationKind.EXACTLY_ONCE) + callsInPlace(builder, EXACTLY_ONCE) } val discordEmoji = kord.rest.emoji.createEmoji(guildId = id, name, image, builder) return GuildEmoji(EmojiData.from(guildId = id, id = discordEmoji.id!!, discordEmoji), kord) @@ -767,7 +766,7 @@ public suspend inline fun GuildBehavior.createTextChannel( builder: TextChannelCreateBuilder.() -> Unit = {} ): TextChannel { contract { - callsInPlace(builder, InvocationKind.EXACTLY_ONCE) + callsInPlace(builder, EXACTLY_ONCE) } val response = kord.rest.guild.createTextChannel(id, name, builder) val data = ChannelData.from(response) @@ -779,7 +778,7 @@ public suspend inline fun GuildBehavior.createForumChannel( name: String, builder: ForumChannelCreateBuilder.() -> Unit = {} ): ForumChannel { - contract { callsInPlace(builder, InvocationKind.EXACTLY_ONCE) } + contract { callsInPlace(builder, EXACTLY_ONCE) } val response = kord.rest.guild.createForumChannel(id, name, builder) val data = ChannelData.from(response) return Channel.from(data, kord) as ForumChannel @@ -797,7 +796,7 @@ public suspend inline fun GuildBehavior.createVoiceChannel( builder: VoiceChannelCreateBuilder.() -> Unit = {} ): VoiceChannel { contract { - callsInPlace(builder, InvocationKind.EXACTLY_ONCE) + callsInPlace(builder, EXACTLY_ONCE) } val response = kord.rest.guild.createVoiceChannel(id, name, builder) val data = ChannelData.from(response) @@ -817,7 +816,7 @@ public suspend inline fun GuildBehavior.createNewsChannel( builder: NewsChannelCreateBuilder.() -> Unit = {} ): NewsChannel { contract { - callsInPlace(builder, InvocationKind.EXACTLY_ONCE) + callsInPlace(builder, EXACTLY_ONCE) } val response = kord.rest.guild.createNewsChannel(id, name, builder) val data = ChannelData.from(response) @@ -838,7 +837,7 @@ public suspend inline fun GuildBehavior.createCategory( builder: CategoryCreateBuilder.() -> Unit = {} ): Category { contract { - callsInPlace(builder, InvocationKind.EXACTLY_ONCE) + callsInPlace(builder, EXACTLY_ONCE) } val response = kord.rest.guild.createCategory(id, name, builder) val data = ChannelData.from(response) @@ -853,7 +852,7 @@ public suspend inline fun GuildBehavior.createCategory( */ public suspend inline fun GuildBehavior.swapChannelPositions(builder: GuildChannelPositionModifyBuilder.() -> Unit) { contract { - callsInPlace(builder, InvocationKind.EXACTLY_ONCE) + callsInPlace(builder, EXACTLY_ONCE) } kord.rest.guild.modifyGuildChannelPosition(id, builder) } @@ -870,7 +869,7 @@ public suspend inline fun GuildBehavior.swapChannelPositions(builder: GuildChann */ public suspend inline fun GuildBehavior.swapRolePositions(builder: RolePositionsModifyBuilder.() -> Unit): Flow { contract { - callsInPlace(builder, InvocationKind.EXACTLY_ONCE) + callsInPlace(builder, EXACTLY_ONCE) } val response = kord.rest.guild.modifyGuildRolePosition(id, builder) return response.asFlow().map { RoleData.from(id, it) }.map { Role(it, kord) } @@ -886,7 +885,7 @@ public suspend inline fun GuildBehavior.swapRolePositions(builder: RolePositions */ public suspend inline fun GuildBehavior.createRole(builder: RoleCreateBuilder.() -> Unit = {}): Role { contract { - callsInPlace(builder, InvocationKind.EXACTLY_ONCE) + callsInPlace(builder, EXACTLY_ONCE) } val response = kord.rest.guild.createGuildRole(id, builder) val data = RoleData.from(id, response) @@ -901,7 +900,7 @@ public suspend inline fun GuildBehavior.createRole(builder: RoleCreateBuilder.() */ public suspend inline fun GuildBehavior.ban(userId: Snowflake, builder: BanCreateBuilder.() -> Unit) { contract { - callsInPlace(builder, InvocationKind.EXACTLY_ONCE) + callsInPlace(builder, EXACTLY_ONCE) } kord.rest.guild.addGuildBan(guildId = id, userId = userId, builder = builder) } @@ -935,7 +934,7 @@ public suspend inline fun GuildBehavior.getChannelOfO } public suspend inline fun GuildBehavior.editWidget(builder: GuildWidgetModifyBuilder.() -> Unit): GuildWidget { - contract { callsInPlace(builder, InvocationKind.EXACTLY_ONCE) } + contract { callsInPlace(builder, EXACTLY_ONCE) } return GuildWidget(GuildWidgetData.from(kord.rest.guild.modifyGuildWidget(id, builder)), id, kord) } @@ -955,7 +954,7 @@ public suspend inline fun GuildBehavior.editWidget(builder: GuildWidgetModifyBui * ``` */ public inline fun GuildBehavior.getAuditLogEntries(builder: AuditLogGetRequestBuilder.() -> Unit = {}): Flow { - contract { callsInPlace(builder, InvocationKind.EXACTLY_ONCE) } + contract { callsInPlace(builder, EXACTLY_ONCE) } return kord.with(rest).getAuditLogEntries(id, builder).map { AuditLogEntry(it, kord) } } @@ -978,7 +977,7 @@ public inline fun GuildBehavior.getAuditLogEntries(builder: AuditLogGetRequestBu */ @PrivilegedIntent public inline fun GuildBehavior.requestMembers(builder: RequestGuildMembersBuilder.() -> Unit = { requestAllMembers() }): Flow { - contract { callsInPlace(builder, InvocationKind.EXACTLY_ONCE) } + contract { callsInPlace(builder, EXACTLY_ONCE) } val request = RequestGuildMembersBuilder(id).apply(builder).toRequest() return requestMembers(request) } @@ -993,7 +992,7 @@ public suspend fun GuildBehavior.createScheduledEvent( entityType: ScheduledEntityType, builder: ScheduledEventCreateBuilder.() -> Unit ): GuildScheduledEvent { - contract { callsInPlace(builder, InvocationKind.EXACTLY_ONCE) } + contract { callsInPlace(builder, EXACTLY_ONCE) } val event = kord.rest.guild.createScheduledEvent(id, name, privacyLevel, scheduledStartTime, entityType, builder) val data = GuildScheduledEventData.from(event) @@ -1069,18 +1068,36 @@ public suspend inline fun GuildBehavior.createKeywordPresetAutoModerationRule( * * @param name the rule name. * @param eventType the rule [event type][AutoModerationRuleEventType]. - * @param mentionLimit total number of unique role and user mentions allowed per message (maximum of 50). * * @throws RestRequestException if something went wrong during the request. */ public suspend inline fun GuildBehavior.createMentionSpamAutoModerationRule( name: String, eventType: AutoModerationRuleEventType = MessageSend, - mentionLimit: Int, builder: MentionSpamAutoModerationRuleCreateBuilder.() -> Unit, ): MentionSpamAutoModerationRule { contract { callsInPlace(builder, EXACTLY_ONCE) } - val rule = kord.rest.autoModeration - .createMentionSpamAutoModerationRule(guildId = id, name, eventType, mentionLimit, builder) + val rule = kord.rest.autoModeration.createMentionSpamAutoModerationRule(guildId = id, name, eventType, builder) return MentionSpamAutoModerationRule(AutoModerationRuleData.from(rule), kord, supplier) } + +@Deprecated( + "The 'mentionLimit' parameter is optional, only 'mentionLimit' OR 'mentionRaidProtectionEnabled' is required.", + ReplaceWith( + "this.createMentionSpamAutoModerationRule(name, eventType) { this@createMentionSpamAutoModerationRule" + + ".mentionLimit = mentionLimit\nbuilder() }" + ), + DeprecationLevel.ERROR, +) +public suspend inline fun GuildBehavior.createMentionSpamAutoModerationRule( + name: String, + eventType: AutoModerationRuleEventType = MessageSend, + mentionLimit: Int, + builder: MentionSpamAutoModerationRuleCreateBuilder.() -> Unit, +): MentionSpamAutoModerationRule { + contract { callsInPlace(builder, EXACTLY_ONCE) } + return createMentionSpamAutoModerationRule(name, eventType) { + this.mentionLimit = mentionLimit + builder() + } +} diff --git a/core/src/commonMain/kotlin/behavior/MemberBehavior.kt b/core/src/commonMain/kotlin/behavior/MemberBehavior.kt index 341825bf4fbe..16d9e5728249 100644 --- a/core/src/commonMain/kotlin/behavior/MemberBehavior.kt +++ b/core/src/commonMain/kotlin/behavior/MemberBehavior.kt @@ -135,7 +135,7 @@ public interface MemberBehavior : KordEntity, UserBehavior { * @throws [RequestException] if anything went wrong during the request. */ public suspend fun getPresenceOrNull(): Presence? { - val data = kord.cache.query { + val data = kord.cache.query { idEq(PresenceData::userId, id) idEq(PresenceData::guildId, guildId) }.singleOrNull() ?: return null @@ -166,7 +166,7 @@ public interface MemberBehavior : KordEntity, UserBehavior { * @throws [RequestException] if anything went wrong during the request. */ public suspend fun getVoiceStateOrNull(): VoiceState? { - val data = kord.cache.query { + val data = kord.cache.query { idEq(VoiceStateData::userId, id) idEq(VoiceStateData::guildId, guildId) }.singleOrNull() ?: return null diff --git a/core/src/commonMain/kotlin/behavior/UserBehavior.kt b/core/src/commonMain/kotlin/behavior/UserBehavior.kt index bc4bfe226e60..2d4e406d8cc8 100644 --- a/core/src/commonMain/kotlin/behavior/UserBehavior.kt +++ b/core/src/commonMain/kotlin/behavior/UserBehavior.kt @@ -128,11 +128,6 @@ public interface UserBehavior : KordEntity, Strategizable { } } - /** - * returns a new [UserBehavior] with the given [strategy]. - * - * @param strategy the strategy to use for the new instance. By default [EntitySupplyStrategy.CacheWithRestFallback]. - */ override fun withStrategy(strategy: EntitySupplyStrategy<*>): UserBehavior = UserBehavior(id, kord, strategy) } diff --git a/core/src/commonMain/kotlin/behavior/channel/BaseVoiceChannelBehavior.kt b/core/src/commonMain/kotlin/behavior/channel/BaseVoiceChannelBehavior.kt index 30c7cc017363..811d3efd2bff 100644 --- a/core/src/commonMain/kotlin/behavior/channel/BaseVoiceChannelBehavior.kt +++ b/core/src/commonMain/kotlin/behavior/channel/BaseVoiceChannelBehavior.kt @@ -20,7 +20,7 @@ public interface BaseVoiceChannelBehavior : CategorizableChannelBehavior { * [terminal operators](https://kotlinlang.org/docs/reference/coroutines/flow.html#terminal-flow-operators) instead. */ public val voiceStates: Flow - get() = kord.cache.query { idEq(VoiceStateData::channelId, id) } + get() = kord.cache.query { idEq(VoiceStateData::channelId, id) } .asFlow() .map { VoiceState(it, kord) } } diff --git a/core/src/commonMain/kotlin/behavior/channel/ChannelBehavior.kt b/core/src/commonMain/kotlin/behavior/channel/ChannelBehavior.kt index 42ffd8272b1c..5408d3bffc45 100644 --- a/core/src/commonMain/kotlin/behavior/channel/ChannelBehavior.kt +++ b/core/src/commonMain/kotlin/behavior/channel/ChannelBehavior.kt @@ -76,7 +76,7 @@ public interface ChannelBehavior : KordEntity, Strategizable { } /** - * Requests to get the [Channel] represented by the [id], + * Requests to get the [Channel] represented by this [ChannelBehavior], * returns null if the [Channel] isn't present. * * @throws [RequestException] if anything went wrong during the request. @@ -86,7 +86,7 @@ public suspend inline fun ChannelBehavior.asChannelOfOrNull /** - * Requests to get the [Channel] represented by the [id]. + * Requests to get the [Channel] represented by this [ChannelBehavior]. * * @throws [RequestException] if anything went wrong during the request. * @throws [EntityNotFoundException] if the [Channel] wasn't present. diff --git a/core/src/commonMain/kotlin/behavior/channel/GuildMessageChannelBehavior.kt b/core/src/commonMain/kotlin/behavior/channel/GuildMessageChannelBehavior.kt index 6b37db6748a1..1e46591fb8e8 100644 --- a/core/src/commonMain/kotlin/behavior/channel/GuildMessageChannelBehavior.kt +++ b/core/src/commonMain/kotlin/behavior/channel/GuildMessageChannelBehavior.kt @@ -17,18 +17,6 @@ import kotlin.time.Duration.Companion.days */ public interface GuildMessageChannelBehavior : GuildChannelBehavior, MessageChannelBehavior { - /** - * Requests to bulk delete the [messages]. - * Messages older than 14 days will be deleted individually. - * - * @param reason the reason showing up in the audit log - * @throws [RestRequestException] if something went wrong during the request. - */ - @Deprecated("Binary compatibility", level = DeprecationLevel.HIDDEN) - public suspend fun bulkDelete(messages: Iterable, reason: String? = null) { - bulkDelete(messages, deleteOlderMessages = true, reason) - } - /** * Requests to bulk delete the [messages]. * diff --git a/core/src/commonMain/kotlin/behavior/channel/NewsChannelBehavior.kt b/core/src/commonMain/kotlin/behavior/channel/NewsChannelBehavior.kt index 8c8bdf030cf3..800896a6058d 100644 --- a/core/src/commonMain/kotlin/behavior/channel/NewsChannelBehavior.kt +++ b/core/src/commonMain/kotlin/behavior/channel/NewsChannelBehavior.kt @@ -1,6 +1,5 @@ package dev.kord.core.behavior.channel -import dev.kord.common.entity.ArchiveDuration import dev.kord.common.entity.ChannelType import dev.kord.common.entity.Permission import dev.kord.common.entity.Snowflake @@ -14,6 +13,7 @@ import dev.kord.core.entity.channel.Channel import dev.kord.core.entity.channel.NewsChannel import dev.kord.core.entity.channel.thread.NewsChannelThread import dev.kord.core.exception.EntityNotFoundException +import dev.kord.core.hash import dev.kord.core.supplier.EntitySupplier import dev.kord.core.supplier.EntitySupplyStrategy import dev.kord.rest.builder.channel.NewsChannelModifyBuilder @@ -25,8 +25,6 @@ import dev.kord.rest.service.patchNewsChannel import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filterIsInstance import kotlinx.datetime.Instant -import dev.kord.core.hash -import kotlin.DeprecationLevel.ERROR import kotlin.contracts.InvocationKind import kotlin.contracts.contract @@ -84,50 +82,17 @@ public interface NewsChannelBehavior : TopGuildMessageChannelBehavior, ThreadPar kord.rest.channel.followNewsChannel(id, ChannelFollowRequest(webhookChannelId = target)) } - @Deprecated( - "Replaced by builder overload", - ReplaceWith("this.startPublicThread(name) {\nautoArchiveDuration = archiveDuration\nthis@startPublicThread.reason = reason\n}"), - level = ERROR, - ) - public suspend fun startPublicThread( - name: String, - archiveDuration: ArchiveDuration = ArchiveDuration.Day, - reason: String? = null - ): NewsChannelThread { - return startPublicThread(name) { - this.reason = reason - this.autoArchiveDuration = archiveDuration - } - } - public suspend fun startPublicThread( name: String, - builder: StartThreadBuilder.() -> Unit, // TODO add empty default when overload is deprecated HIDDEN + builder: StartThreadBuilder.() -> Unit = {}, ): NewsChannelThread { return unsafeStartThread(name, type = ChannelType.PublicNewsThread, builder) as NewsChannelThread } - @Deprecated( - "Replaced by builder overload", - ReplaceWith("this.startPublicThreadWithMessage(messageId, name) {\nautoArchiveDuration = archiveDuration\nthis@startPublicThreadWithMessage.reason = reason\n}"), - level = ERROR, - ) - public suspend fun startPublicThreadWithMessage( - messageId: Snowflake, - name: String, - archiveDuration: ArchiveDuration = ArchiveDuration.Day, - reason: String? = null - ): NewsChannelThread { - return startPublicThreadWithMessage(messageId, name) { - this.reason = reason - this.autoArchiveDuration = archiveDuration - } - } - public suspend fun startPublicThreadWithMessage( messageId: Snowflake, name: String, - builder: StartThreadWithMessageBuilder.() -> Unit, // TODO add empty default when overload is deprecated HIDDEN + builder: StartThreadWithMessageBuilder.() -> Unit = {}, ): NewsChannelThread { return unsafeStartPublicThreadWithMessage(messageId, name, builder) as NewsChannelThread } diff --git a/core/src/commonMain/kotlin/behavior/channel/TextChannelBehavior.kt b/core/src/commonMain/kotlin/behavior/channel/TextChannelBehavior.kt index 49e6cfab04f0..63d15d744c2d 100644 --- a/core/src/commonMain/kotlin/behavior/channel/TextChannelBehavior.kt +++ b/core/src/commonMain/kotlin/behavior/channel/TextChannelBehavior.kt @@ -1,6 +1,5 @@ package dev.kord.core.behavior.channel -import dev.kord.common.entity.ArchiveDuration import dev.kord.common.entity.ChannelType import dev.kord.common.entity.Snowflake import dev.kord.common.exception.RequestException @@ -13,6 +12,7 @@ import dev.kord.core.entity.channel.Channel import dev.kord.core.entity.channel.TextChannel import dev.kord.core.entity.channel.thread.TextChannelThread import dev.kord.core.exception.EntityNotFoundException +import dev.kord.core.hash import dev.kord.core.supplier.EntitySupplier import dev.kord.core.supplier.EntitySupplyStrategy import dev.kord.rest.builder.channel.TextChannelModifyBuilder @@ -23,8 +23,6 @@ import dev.kord.rest.service.patchTextChannel import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filterIsInstance import kotlinx.datetime.Instant -import dev.kord.core.hash -import kotlin.DeprecationLevel.ERROR import kotlin.contracts.InvocationKind import kotlin.contracts.contract @@ -67,73 +65,24 @@ public interface TextChannelBehavior : TopGuildMessageChannelBehavior, PrivateTh */ override suspend fun fetchChannelOrNull(): TextChannel? = super.fetchChannelOrNull() as? TextChannel - @Deprecated( - "Replaced by overload with autoArchiveDuration in builder lambda", - ReplaceWith("this.startPublicThread(name) {\nautoArchiveDuration = archiveDuration\nbuilder()\n}"), - level = ERROR, - ) public suspend fun startPublicThread( name: String, - archiveDuration: ArchiveDuration = ArchiveDuration.Day, - builder: StartThreadBuilder.() -> Unit = {} - ): TextChannelThread { - return startPublicThread(name) { - this.autoArchiveDuration = archiveDuration - builder() - } - } - - public suspend fun startPublicThread( - name: String, - builder: StartThreadBuilder.() -> Unit, + builder: StartThreadBuilder.() -> Unit = {}, ): TextChannelThread { return unsafeStartThread(name, type = ChannelType.PublicGuildThread, builder) as TextChannelThread } - @Deprecated( - "Replaced by overload with autoArchiveDuration in builder lambda", - ReplaceWith("this.startPrivateThread(name) {\nautoArchiveDuration = archiveDuration\nbuilder()\n}"), - level = ERROR, - ) - public suspend fun startPrivateThread( - name: String, - archiveDuration: ArchiveDuration = ArchiveDuration.Day, - builder: StartThreadBuilder.() -> Unit = {} - ): TextChannelThread { - return startPrivateThread(name) { - this.autoArchiveDuration = archiveDuration - builder() - } - } - public suspend fun startPrivateThread( name: String, - builder: StartThreadBuilder.() -> Unit, // TODO add empty default when overload is deprecated HIDDEN + builder: StartThreadBuilder.() -> Unit = {}, ): TextChannelThread { return unsafeStartThread(name, type = ChannelType.PrivateThread, builder) as TextChannelThread } - @Deprecated( - "Replaced by builder overload", - ReplaceWith("this.startPublicThreadWithMessage(messageId, name) {\nautoArchiveDuration = archiveDuration\nthis@startPublicThreadWithMessage.reason = reason\n}"), - level = ERROR, - ) - public suspend fun startPublicThreadWithMessage( - messageId: Snowflake, - name: String, - archiveDuration: ArchiveDuration = ArchiveDuration.Day, - reason: String? = null - ): TextChannelThread { - return startPublicThreadWithMessage(messageId, name) { - this.autoArchiveDuration = archiveDuration - this.reason = reason - } - } - public suspend fun startPublicThreadWithMessage( messageId: Snowflake, name: String, - builder: StartThreadWithMessageBuilder.() -> Unit, // TODO add empty default when overload is deprecated HIDDEN + builder: StartThreadWithMessageBuilder.() -> Unit = {}, ): TextChannelThread { return unsafeStartPublicThreadWithMessage(messageId, name, builder) as TextChannelThread } diff --git a/core/src/commonMain/kotlin/behavior/channel/threads/ThreadParentChannelBehavior.kt b/core/src/commonMain/kotlin/behavior/channel/threads/ThreadParentChannelBehavior.kt index 32d1c4e4a693..dfe282de4f0c 100644 --- a/core/src/commonMain/kotlin/behavior/channel/threads/ThreadParentChannelBehavior.kt +++ b/core/src/commonMain/kotlin/behavior/channel/threads/ThreadParentChannelBehavior.kt @@ -121,8 +121,9 @@ public interface PrivateThreadParentChannelBehavior : ThreadParentChannelBehavio } /** - * starts a thread in the current thread parent based on [type] using given [name] and archived after [archiveDuration]. - * [type] should match the parent types. + * Starts a thread in the current thread parent based on [type] using the given [name]. [type] should match the parent + * types. + * * @throws [RequestException] if something went wrong during the request. */ internal suspend fun ThreadParentChannelBehavior.unsafeStartThread( diff --git a/core/src/commonMain/kotlin/behavior/interaction/AutoCompleteInteractionBehavior.kt b/core/src/commonMain/kotlin/behavior/interaction/AutoCompleteInteractionBehavior.kt index 6dd16edaf97a..e2b9f2c8b32f 100644 --- a/core/src/commonMain/kotlin/behavior/interaction/AutoCompleteInteractionBehavior.kt +++ b/core/src/commonMain/kotlin/behavior/interaction/AutoCompleteInteractionBehavior.kt @@ -7,7 +7,6 @@ import dev.kord.core.supplier.EntitySupplyStrategy import dev.kord.rest.builder.interaction.IntegerOptionBuilder import dev.kord.rest.builder.interaction.NumberOptionBuilder import dev.kord.rest.builder.interaction.StringChoiceBuilder -import kotlin.DeprecationLevel.ERROR import kotlin.contracts.InvocationKind import kotlin.contracts.contract @@ -24,16 +23,6 @@ public interface AutoCompleteInteractionBehavior : DataInteractionBehavior { override fun withStrategy(strategy: EntitySupplyStrategy<*>): AutoCompleteInteractionBehavior } -@Deprecated( - "Renamed to 'suggestInteger'.", - ReplaceWith("this.suggestInteger { builder() }", "dev.kord.core.behavior.interaction.suggestInteger"), - level = ERROR, -) -public suspend inline fun AutoCompleteInteractionBehavior.suggestInt(builder: IntegerOptionBuilder.() -> Unit) { - contract { callsInPlace(builder, InvocationKind.EXACTLY_ONCE) } - suggestInteger(builder) -} - /** * Responds to the interaction with the integer choices specified by [builder]. * diff --git a/core/src/commonMain/kotlin/builder/component/ButtonBuilderExtensions.kt b/core/src/commonMain/kotlin/builder/components/ButtonBuilderExtensions.kt similarity index 100% rename from core/src/commonMain/kotlin/builder/component/ButtonBuilderExtensions.kt rename to core/src/commonMain/kotlin/builder/components/ButtonBuilderExtensions.kt diff --git a/core/src/commonMain/kotlin/builder/kord/KordBuilder.kt b/core/src/commonMain/kotlin/builder/kord/KordBuilder.kt index 2fd01fb236c1..93047d5199ae 100644 --- a/core/src/commonMain/kotlin/builder/kord/KordBuilder.kt +++ b/core/src/commonMain/kotlin/builder/kord/KordBuilder.kt @@ -3,7 +3,6 @@ package dev.kord.core.builder.kord import dev.kord.cache.api.DataCache import dev.kord.common.KordConstants import dev.kord.common.entity.Snowflake -import dev.kord.common.ratelimit.IntervalRateLimiter import dev.kord.core.ClientResources import dev.kord.core.Kord import dev.kord.core.cache.CachingGateway @@ -20,8 +19,6 @@ import dev.kord.gateway.DefaultGateway import dev.kord.gateway.Gateway import dev.kord.gateway.builder.Shards import dev.kord.gateway.ratelimit.IdentifyRateLimiter -import dev.kord.gateway.retry.LinearRetry -import dev.kord.gateway.retry.Retry import dev.kord.rest.json.response.BotGatewayResponse import dev.kord.rest.ratelimit.ExclusionRequestRateLimiter import dev.kord.rest.request.* @@ -38,26 +35,8 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.serialization.json.Json import mu.KotlinLogging -import kotlin.DeprecationLevel.HIDDEN import kotlin.contracts.InvocationKind import kotlin.contracts.contract -import kotlin.time.Duration.Companion.seconds - -@Deprecated( - "Use DefaultGateway {} instead.", - ReplaceWith("DefaultGateway {\nclient = resources.httpClient\nthis@DefaultGateway.retry = retry\n}"), - level = HIDDEN, -) -public operator fun DefaultGateway.Companion.invoke( - resources: ClientResources, - retry: Retry = LinearRetry(2.seconds, 60.seconds, 10) -): DefaultGateway { - return DefaultGateway { - client = resources.httpClient - reconnectRetry = retry - sendRateLimiter = IntervalRateLimiter(limit = 120, interval = 60.seconds) - } -} private val logger = KotlinLogging.logger { } private val gatewayInfoJson = Json { ignoreUnknownKeys = true } diff --git a/core/src/commonMain/kotlin/cache/CachingGateway.kt b/core/src/commonMain/kotlin/cache/CachingGateway.kt index f197bcc575e8..9b7f01b1da66 100644 --- a/core/src/commonMain/kotlin/cache/CachingGateway.kt +++ b/core/src/commonMain/kotlin/cache/CachingGateway.kt @@ -15,7 +15,7 @@ import kotlin.coroutines.CoroutineContext public class CachingGateway( private val cache: DataCache, private val gateway: Gateway, - private val dispatcher: CoroutineDispatcher = Dispatchers.Default + dispatcher: CoroutineDispatcher = Dispatchers.Default ) : DataCache by cache, Gateway by gateway, CoroutineScope { override val coroutineContext: CoroutineContext = SupervisorJob() + dispatcher diff --git a/core/src/commonMain/kotlin/cache/DataCacheExtensions.kt b/core/src/commonMain/kotlin/cache/DataCacheExtensions.kt index ec322be7f50d..cfa661b3c879 100644 --- a/core/src/commonMain/kotlin/cache/DataCacheExtensions.kt +++ b/core/src/commonMain/kotlin/cache/DataCacheExtensions.kt @@ -4,6 +4,8 @@ import dev.kord.cache.api.DataCache import dev.kord.cache.api.query import dev.kord.common.annotation.KordInternal import dev.kord.core.cache.data.* +import kotlin.DeprecationLevel.HIDDEN +import kotlin.jvm.JvmName /** * Registers all Kord data classes for this cache @@ -56,4 +58,9 @@ internal suspend fun DataCache.removeKordData() { * Creates a [DataCacheView] for this view, only removing elements that were added * directly to this instance. */ -public suspend fun DataCache.createView(): DataCacheView = DataCacheView(this) +public fun DataCache.createView(): DataCacheView = DataCacheView(this) + +@Suppress("RedundantSuspendModifier") +@Deprecated("Binary compatibility, keep for some releases.", level = HIDDEN) +@JvmName("createView") +public suspend fun DataCache.createView0(): DataCacheView = createView() diff --git a/core/src/commonMain/kotlin/cache/data/ActivityData.kt b/core/src/commonMain/kotlin/cache/data/ActivityData.kt index 23ee4efef8e8..6a68104e7359 100644 --- a/core/src/commonMain/kotlin/cache/data/ActivityData.kt +++ b/core/src/commonMain/kotlin/cache/data/ActivityData.kt @@ -4,8 +4,7 @@ import dev.kord.common.entity.* import dev.kord.common.entity.optional.Optional import dev.kord.common.entity.optional.OptionalBoolean import dev.kord.common.entity.optional.OptionalSnowflake -import dev.kord.common.serialization.InstantInEpochMillisecondsSerializer -import kotlinx.datetime.Instant +import dev.kord.common.serialization.InstantInEpochMilliseconds import kotlinx.serialization.Serializable @Serializable @@ -13,8 +12,7 @@ public data class ActivityData( val name: String, val type: ActivityType, val url: Optional = Optional.Missing(), - @Serializable(with = InstantInEpochMillisecondsSerializer::class) - val createdAt: Instant, + val createdAt: InstantInEpochMilliseconds, val timestamps: Optional = Optional.Missing(), val applicationId: OptionalSnowflake = OptionalSnowflake.Missing, val details: Optional = Optional.Missing(), diff --git a/core/src/commonMain/kotlin/cache/data/ApplicationCommandData.kt b/core/src/commonMain/kotlin/cache/data/ApplicationCommandData.kt index c1deb359669d..57aecb8c74a2 100644 --- a/core/src/commonMain/kotlin/cache/data/ApplicationCommandData.kt +++ b/core/src/commonMain/kotlin/cache/data/ApplicationCommandData.kt @@ -98,7 +98,6 @@ public class ApplicationCommandGroupData( public val subCommands: List ) -@Suppress("FunctionName") public fun ApplicationCommandGroupData(data: ApplicationCommandOptionData): ApplicationCommandGroupData { return ApplicationCommandGroupData( data.name, @@ -139,7 +138,6 @@ public data class ApplicationCommandParameterData( ) -@Suppress("FunctionName") public fun ApplicationCommandParameterData(data: ApplicationCommandOptionData): ApplicationCommandParameterData { return ApplicationCommandParameterData( data.name, diff --git a/core/src/commonMain/kotlin/cache/data/ApplicationData.kt b/core/src/commonMain/kotlin/cache/data/ApplicationData.kt index 6cffd5acfdab..d961b35be6dc 100644 --- a/core/src/commonMain/kotlin/cache/data/ApplicationData.kt +++ b/core/src/commonMain/kotlin/cache/data/ApplicationData.kt @@ -24,6 +24,7 @@ public sealed interface BaseApplicationData { public val tags: Optional> public val installParams: Optional public val customInstallUrl: Optional + public val roleConnectionsVerificationUrl: Optional } @Serializable @@ -48,6 +49,7 @@ public data class ApplicationData( override val tags: Optional> = Optional.Missing(), override val installParams: Optional = Optional.Missing(), override val customInstallUrl: Optional = Optional.Missing(), + override val roleConnectionsVerificationUrl: Optional = Optional.Missing(), ) : BaseApplicationData { public companion object { @@ -73,6 +75,7 @@ public data class ApplicationData( tags, installParams, customInstallUrl, + roleConnectionsVerificationUrl, ) } } @@ -98,6 +101,7 @@ public data class PartialApplicationData( override val tags: Optional> = Optional.Missing(), override val installParams: Optional = Optional.Missing(), override val customInstallUrl: Optional = Optional.Missing(), + override val roleConnectionsVerificationUrl: Optional = Optional.Missing(), ) : BaseApplicationData { public companion object { @@ -120,6 +124,7 @@ public data class PartialApplicationData( tags, installParams, customInstallUrl, + roleConnectionsVerificationUrl, ) } } diff --git a/core/src/commonMain/kotlin/cache/data/AttachmentData.kt b/core/src/commonMain/kotlin/cache/data/AttachmentData.kt index cca121971a22..509117004fe3 100644 --- a/core/src/commonMain/kotlin/cache/data/AttachmentData.kt +++ b/core/src/commonMain/kotlin/cache/data/AttachmentData.kt @@ -5,6 +5,7 @@ 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.OptionalInt +import dev.kord.common.serialization.DurationInDoubleSeconds import kotlinx.serialization.Serializable @Serializable @@ -18,11 +19,13 @@ public data class AttachmentData( val proxyUrl: String, val height: OptionalInt? = OptionalInt.Missing, val width: OptionalInt? = OptionalInt.Missing, - val ephemeral: OptionalBoolean = OptionalBoolean.Missing + val ephemeral: OptionalBoolean = OptionalBoolean.Missing, + val durationSecs: Optional = Optional.Missing(), + val waveform: Optional = Optional.Missing() ) { public companion object { public fun from(entity: DiscordAttachment): AttachmentData = with(entity) { - AttachmentData(id, filename, description, contentType, size, url, proxyUrl, height, width, ephemeral) + AttachmentData(id, filename, description, contentType, size, url, proxyUrl, height, width, ephemeral, durationSecs, waveform) } } } diff --git a/core/src/commonMain/kotlin/cache/data/AutoModeration.kt b/core/src/commonMain/kotlin/cache/data/AutoModeration.kt index ba1eeb70872d..aa8b492a0dd2 100644 --- a/core/src/commonMain/kotlin/cache/data/AutoModeration.kt +++ b/core/src/commonMain/kotlin/cache/data/AutoModeration.kt @@ -3,10 +3,7 @@ package dev.kord.core.cache.data import dev.kord.cache.api.data.DataDescription import dev.kord.cache.api.data.description import dev.kord.common.entity.* -import dev.kord.common.entity.optional.Optional -import dev.kord.common.entity.optional.OptionalInt -import dev.kord.common.entity.optional.OptionalSnowflake -import dev.kord.common.entity.optional.map +import dev.kord.common.entity.optional.* import dev.kord.common.serialization.DurationInSeconds import kotlinx.serialization.Serializable @@ -53,6 +50,7 @@ public data class AutoModerationRuleTriggerMetadataData( val presets: Optional> = Optional.Missing(), val allowList: Optional> = Optional.Missing(), val mentionTotalLimit: OptionalInt = OptionalInt.Missing, + val mentionRaidProtectionEnabled: OptionalBoolean = OptionalBoolean.Missing, ) { public companion object { public fun from(metadata: DiscordAutoModerationRuleTriggerMetadata): AutoModerationRuleTriggerMetadataData = @@ -63,6 +61,7 @@ public data class AutoModerationRuleTriggerMetadataData( presets = presets, allowList = allowList, mentionTotalLimit = mentionTotalLimit, + mentionRaidProtectionEnabled = mentionRaidProtectionEnabled, ) } } diff --git a/core/src/commonMain/kotlin/cache/data/EmbedData.kt b/core/src/commonMain/kotlin/cache/data/EmbedData.kt index 1e93f427366f..b6d58c83b800 100644 --- a/core/src/commonMain/kotlin/cache/data/EmbedData.kt +++ b/core/src/commonMain/kotlin/cache/data/EmbedData.kt @@ -112,7 +112,7 @@ public data class EmbedProviderData( @Serializable public data class EmbedAuthorData( val name: Optional = Optional.Missing(), - val url: Optional = Optional.Missing(), + val url: Optional = Optional.Missing(), val iconUrl: Optional = Optional.Missing(), val proxyIconUrl: Optional = Optional.Missing(), ) { diff --git a/core/src/commonMain/kotlin/cache/data/GuildApplicationCommandPermissionsData.kt b/core/src/commonMain/kotlin/cache/data/GuildApplicationCommandPermissionsData.kt index ce5496efb3cb..3a74d2835a86 100644 --- a/core/src/commonMain/kotlin/cache/data/GuildApplicationCommandPermissionsData.kt +++ b/core/src/commonMain/kotlin/cache/data/GuildApplicationCommandPermissionsData.kt @@ -2,7 +2,6 @@ package dev.kord.core.cache.data import dev.kord.cache.api.data.DataDescription import dev.kord.cache.api.data.description -import dev.kord.common.annotation.KordPreview import dev.kord.common.entity.DiscordGuildApplicationCommandPermissions import dev.kord.common.entity.Snowflake diff --git a/core/src/commonMain/kotlin/cache/data/GuildData.kt b/core/src/commonMain/kotlin/cache/data/GuildData.kt index 9fe3dedc0007..36c3beababd5 100644 --- a/core/src/commonMain/kotlin/cache/data/GuildData.kt +++ b/core/src/commonMain/kotlin/cache/data/GuildData.kt @@ -65,7 +65,8 @@ public data class GuildData( val stageInstances: Optional> = Optional.Missing(), val stickers: Optional> = Optional.Missing(), val guildScheduledEvents: Optional> = Optional.Missing(), - val premiumProgressBarEnabled: Boolean + val premiumProgressBarEnabled: Boolean, + val safetyAlertsChannelId: Snowflake?, ) { public companion object { @@ -133,7 +134,8 @@ public data class GuildData( stageInstances = stageInstances.mapList { StageInstanceData.from(it) }, stickers = stickers.mapList { StickerData.from(it) }, guildScheduledEvents = guildScheduledEvents.mapList { GuildScheduledEventData.from(it) }, - premiumProgressBarEnabled = premiumProgressBarEnabled + premiumProgressBarEnabled = premiumProgressBarEnabled, + safetyAlertsChannelId = safetyAlertsChannelId, ) } } diff --git a/core/src/commonMain/kotlin/cache/data/UserData.kt b/core/src/commonMain/kotlin/cache/data/UserData.kt index 9e06dd8938e3..b8cefb6613ce 100644 --- a/core/src/commonMain/kotlin/cache/data/UserData.kt +++ b/core/src/commonMain/kotlin/cache/data/UserData.kt @@ -9,6 +9,7 @@ import dev.kord.common.entity.UserFlags import dev.kord.common.entity.optional.Optional import dev.kord.common.entity.optional.OptionalBoolean import kotlinx.serialization.Serializable +import kotlin.DeprecationLevel.WARNING private val WebhookData.nullableUserId get() = userId.value @@ -16,7 +17,13 @@ private val WebhookData.nullableUserId get() = userId.value public data class UserData( val id: Snowflake, val username: String, - val discriminator: String, + @Deprecated( + "Discord's username system is changing and discriminators are being removed, see " + + "https://discord.com/developers/docs/change-log#unique-usernames-on-discord for details.", + level = WARNING, + ) + val discriminator: Optional = Optional.Missing(), + val globalName: Optional = Optional.Missing(), val avatar: String? = null, val bot: OptionalBoolean = OptionalBoolean.Missing, val publicFlags: Optional = Optional.Missing(), @@ -33,11 +40,11 @@ public data class UserData( } public fun from(entity: DiscordUser): UserData = with(entity) { - UserData(id, username, discriminator, avatar, bot, publicFlags, banner, accentColor) + UserData(id, username, @Suppress("DEPRECATION") discriminator, globalName, avatar, bot, publicFlags, banner, accentColor) } public fun from(entity: DiscordOptionallyMemberUser): UserData = with(entity) { - UserData(id, username, discriminator, avatar, bot, publicFlags) + UserData(id, username, @Suppress("DEPRECATION") discriminator, globalName, avatar, bot, publicFlags) } } diff --git a/core/src/commonMain/kotlin/entity/Application.kt b/core/src/commonMain/kotlin/entity/Application.kt index f00c41bd06e4..7bbbc522aa88 100644 --- a/core/src/commonMain/kotlin/entity/Application.kt +++ b/core/src/commonMain/kotlin/entity/Application.kt @@ -25,6 +25,8 @@ public sealed class BaseApplication( public val name: String get() = data.name + public val icon: Asset? get() = iconHash?.let { Asset.applicationIcon(id, it, kord) } + public val iconHash: String? get() = data.icon public val description: String get() = data.description @@ -52,6 +54,8 @@ public sealed class BaseApplication( public val slug: String? get() = data.slug.value + public val coverImage: Asset? get() = coverImageHash?.let { Asset.applicationCover(id, it, kord) } + public val coverImageHash: String? get() = data.coverImage.value public val flags: ApplicationFlags? get() = data.flags.value @@ -65,6 +69,12 @@ public sealed class BaseApplication( /** The application's default custom authorization link, if enabled. */ public val customInstallUrl: String? get() = data.customInstallUrl.value + /** + * The application's role connection verification entry point, which when configured will render the app as a + * verification method in the guild role verification configuration. + */ + public val roleConnectionsVerificationUrl: String? get() = data.roleConnectionsVerificationUrl.value + public suspend fun getOwnerOrNull(): User? = ownerId?.let { supplier.getUserOrNull(it) } diff --git a/core/src/commonMain/kotlin/entity/Asset.kt b/core/src/commonMain/kotlin/entity/Asset.kt new file mode 100644 index 000000000000..0e3ef4ac8826 --- /dev/null +++ b/core/src/commonMain/kotlin/entity/Asset.kt @@ -0,0 +1,110 @@ +package dev.kord.core.entity + +import dev.kord.common.entity.MessageStickerType +import dev.kord.common.entity.Snowflake +import dev.kord.core.Kord +import dev.kord.core.KordObject +import dev.kord.rest.Image +import dev.kord.rest.Image.Format.* +import dev.kord.rest.route.CdnUrl +import dev.kord.rest.route.DiscordCdn + +public class Asset private constructor( + public val isAnimated: Boolean, + public val cdnUrl: CdnUrl, + override val kord: Kord, + private val recommendedFormat: Image.Format? = null, +) : KordObject { + + public suspend fun getImage(format: Image.Format? = null, size: Image.Size? = null): Image = Image.fromUrl( + client = kord.resources.httpClient, + url = cdnUrl.toUrl { + this.format = format ?: recommendedFormat ?: if (isAnimated) GIF else PNG + if (size != null) this.size = size + }, + ) + + public companion object { + // see https://discord.com/developers/docs/reference#image-formatting-cdn-endpoints + + private val String.isAnimated get() = startsWith("a_") + + private fun unknownFormatType(formatType: MessageStickerType): Nothing = + throw IllegalArgumentException("Unknown formatType: $formatType") + + + public fun emoji(emojiId: Snowflake, isAnimated: Boolean, kord: Kord): Asset = + Asset(isAnimated, DiscordCdn.emoji(emojiId), kord) + + public fun guildIcon(guildId: Snowflake, hash: String, kord: Kord): Asset = + Asset(hash.isAnimated, DiscordCdn.guildIcon(guildId, hash), kord) + + public fun guildSplash(guildId: Snowflake, hash: String, kord: Kord): Asset = + Asset(isAnimated = false, DiscordCdn.guildSplash(guildId, hash), kord) + + public fun guildDiscoverySplash(guildId: Snowflake, hash: String, kord: Kord): Asset = + Asset(isAnimated = false, DiscordCdn.guildDiscoverySplash(guildId, hash), kord) + + public fun guildBanner(guildId: Snowflake, hash: String, kord: Kord): Asset = + Asset(hash.isAnimated, DiscordCdn.guildBanner(guildId, hash), kord) + + public fun userBanner(userId: Snowflake, hash: String, kord: Kord): Asset = + Asset(hash.isAnimated, DiscordCdn.userBanner(userId, hash), kord) + + @Suppress("DEPRECATION") + @Deprecated( + "Discord's username system is changing and discriminators are being removed, see " + + "https://discord.com/developers/docs/change-log#unique-usernames-on-discord for details.", + ReplaceWith("Asset.defaultUserAvatar(userId, kord)", imports = ["dev.kord.core.entity.Asset"]), + DeprecationLevel.WARNING, + ) + public fun defaultUserAvatar(discriminator: Int, kord: Kord): Asset = + Asset(isAnimated = false, DiscordCdn.defaultAvatar(discriminator), kord, recommendedFormat = PNG) + + public fun defaultUserAvatar(userId: Snowflake, kord: Kord): Asset = + Asset(isAnimated = false, DiscordCdn.defaultUserAvatar(userId), kord, recommendedFormat = PNG) + + public fun userAvatar(userId: Snowflake, hash: String, kord: Kord): Asset = + Asset(hash.isAnimated, DiscordCdn.userAvatar(userId, hash), kord) + + public fun memberAvatar(guildId: Snowflake, userId: Snowflake, hash: String, kord: Kord): Asset = + Asset(hash.isAnimated, DiscordCdn.memberAvatar(guildId, userId, hash), kord) + + public fun applicationIcon(applicationId: Snowflake, hash: String, kord: Kord): Asset = + Asset(isAnimated = false, DiscordCdn.applicationIcon(applicationId, hash), kord) + + public fun applicationCover(applicationId: Snowflake, hash: String, kord: Kord): Asset = + Asset(isAnimated = false, DiscordCdn.applicationCover(applicationId, hash), kord) + + public fun stickerPackBanner(bannerId: Snowflake, kord: Kord): Asset = + Asset(isAnimated = false, DiscordCdn.stickerPackBanner(bannerId), kord) + + public fun teamIcon(teamId: Snowflake, hash: String, kord: Kord): Asset = + Asset(isAnimated = false, DiscordCdn.teamIcon(teamId, hash), kord) + + public fun sticker(stickerId: Snowflake, formatType: MessageStickerType, kord: Kord): Asset = Asset( + isAnimated = when (formatType) { + MessageStickerType.PNG -> false + MessageStickerType.APNG, MessageStickerType.LOTTIE, MessageStickerType.GIF -> true + is MessageStickerType.Unknown -> unknownFormatType(formatType) + }, + DiscordCdn.sticker(stickerId), + kord, + recommendedFormat = when (formatType) { + MessageStickerType.PNG, MessageStickerType.APNG -> PNG + MessageStickerType.LOTTIE -> LOTTIE + MessageStickerType.GIF -> GIF + is MessageStickerType.Unknown -> unknownFormatType(formatType) + }, + ) + + public fun roleIcon(roleId: Snowflake, hash: String, kord: Kord): Asset = + Asset(isAnimated = false, DiscordCdn.roleIcon(roleId, hash), kord) + + public fun guildScheduledEventCover(eventId: Snowflake, hash: String, kord: Kord): Asset = + Asset(isAnimated = false, DiscordCdn.guildScheduledEventCover(eventId, hash), kord) + + public fun memberBanner(guildId: Snowflake, userId: Snowflake, hash: String, kord: Kord): Asset = + Asset(hash.isAnimated, DiscordCdn.memberBanner(guildId, userId, hash), kord) + } +} diff --git a/core/src/commonMain/kotlin/entity/Attachment.kt b/core/src/commonMain/kotlin/entity/Attachment.kt index 6bd5b83254cc..5c0022bde374 100644 --- a/core/src/commonMain/kotlin/entity/Attachment.kt +++ b/core/src/commonMain/kotlin/entity/Attachment.kt @@ -5,8 +5,10 @@ import dev.kord.common.entity.Snowflake import dev.kord.common.entity.optional.value import dev.kord.core.Kord import dev.kord.core.cache.data.AttachmentData -import dev.kord.rest.Image import dev.kord.core.hash +import dev.kord.rest.Image +import io.ktor.util.* +import kotlin.time.Duration /** * An instance of a [Discord Attachment](https://discord.com/developers/docs/resources/channel#attachment-object). @@ -58,12 +60,23 @@ public data class Attachment(val data: AttachmentData, override val kord: Kord) */ val width: Int? get() = data.width.value + /** + * The duration of the audio file (currently for voice messages). + */ + val duration: Duration? get() = data.durationSecs.value + + /** + * A sampled waveform (currently for voice messages). + */ + val waveform: ByteArray? get() = data.waveform.value?.decodeBase64Bytes() + /** * If this file is displayed as a spoiler. Denoted by the `SPOILER_` prefix in the name. */ val isSpoiler: Boolean get() = filename.startsWith("SPOILER_") - val isEphemeral: Boolean get() = data.ephemeral.discordBoolean + val isEphemeral: Boolean get() = data.ephemeral.discordBoolean + /** * If this file is an image. Denoted by the presence of a [width] and [height]. */ diff --git a/core/src/commonMain/kotlin/entity/Emoji.kt b/core/src/commonMain/kotlin/entity/Emoji.kt index 754126e60557..707212450fdb 100644 --- a/core/src/commonMain/kotlin/entity/Emoji.kt +++ b/core/src/commonMain/kotlin/entity/Emoji.kt @@ -137,7 +137,12 @@ public class GuildEmoji( /** * The image as [Icon] object for the emoji */ - public val image: Icon get() = Icon.EmojiIcon(data.animated.discordBoolean, data.id, kord) + @Suppress("DEPRECATION_ERROR") + @Deprecated("Binary compatibility", level = DeprecationLevel.HIDDEN) + public fun getImage(): Icon = Icon.EmojiIcon(data.animated.discordBoolean, data.id, kord) + + /** The image of this emoji as an [Asset]. */ + public val image: Asset get() = Asset.emoji(id, isAnimated, kord) /** * Requests to delete this emoji, with the given [reason]. diff --git a/core/src/commonMain/kotlin/entity/Guild.kt b/core/src/commonMain/kotlin/entity/Guild.kt index 8040dc67d6df..5230e03c85ee 100644 --- a/core/src/commonMain/kotlin/entity/Guild.kt +++ b/core/src/commonMain/kotlin/entity/Guild.kt @@ -25,6 +25,7 @@ import dev.kord.rest.service.RestClient import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.flow import kotlinx.datetime.Instant +import kotlin.DeprecationLevel.HIDDEN import kotlin.time.Duration /** @@ -107,6 +108,8 @@ public class Guild( */ public val bannerHash: String? get() = data.banner + public val banner: Asset? get() = bannerHash?.let { Asset.guildBanner(id, it, kord) } + /** * The ids of all [channels][TopGuildChannel]. */ @@ -158,6 +161,8 @@ public class Guild( */ public val iconHash: String? get() = data.icon + public val icon: Asset? get() = iconHash?.let { Asset.guildIcon(id, it, kord) } + /** * The time at which this guild was joined, if present. */ @@ -261,11 +266,15 @@ public class Guild( */ public val splashHash: String? get() = data.splash.value + public val splash: Asset? get() = splashHash?.let { Asset.guildSplash(id, it, kord) } + /** * The hash of the discovery splash, if present. */ public val discoverySplashHash: String? get() = data.discoverySplash.value + public val discoverySplash: Asset? get() = discoverySplashHash?.let { Asset.guildDiscoverySplash(id, it, kord) } + /** * The id of the channel to which system messages are sent. */ @@ -330,6 +339,15 @@ public class Guild( public val premiumProgressBarEnabled: Boolean get() = data.premiumProgressBarEnabled + /** The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord. */ + public val safetyAlertsChannelId: Snowflake? get() = data.safetyAlertsChannelId + + /** + * The behavior of the channel where admins and moderators of Community guilds receive safety alerts from Discord. + */ + public val safetyAlertsChannel: TextChannelBehavior? + get() = safetyAlertsChannelId?.let { TextChannelBehavior(guildId = id, id = it, kord) } + public val stageInstances: Set get() = data.stageInstances.orEmpty().map { StageInstance(it, kord) }.toSet() @@ -351,21 +369,27 @@ public class Guild( /** * Gets the banner url in the specified format. */ + @Deprecated("Old method", ReplaceWith("this.banner?.cdnUrl?.toUrl { this@toUrl.format = format }"), level = HIDDEN) public fun getBannerUrl(format: Image.Format): String? = + getBannerUrl0(format) + + private fun getBannerUrl0(format: Image.Format) = data.banner?.let { "https://cdn.discordapp.com/banners/$id/$it.${format.extension}" } /** * Requests to get the banner image in the specified [format], if present. */ + @Suppress("DEPRECATION_ERROR") + @Deprecated("Old method", ReplaceWith("this.banner?.getImage(format)"), level = HIDDEN) public suspend fun getBanner(format: Image.Format): Image? { - val url = getBannerUrl(format) ?: return null + val url = getBannerUrl0(format) ?: return null return Image.fromUrl(kord.resources.httpClient, url) } /** - * Requests to get the [TopGuildChannel] represented by the [embedChannel], - * returns null if the [TopGuildChannel] isn't present or [embedChannel] is null. + * Requests to get the [TopGuildChannel] represented by the [widgetChannelId], + * returns null if the [TopGuildChannel] isn't present or [widgetChannelId] is null. * * @throws [RequestException] if anything went wrong during the request. */ @@ -409,7 +433,15 @@ public class Guild( /** * Gets the discovery splash url in the specified [format], if present. */ + @Deprecated( + "Old method", + ReplaceWith("this.discoverySplash?.cdnUrl?.toUrl { this@toUrl.format = format }"), + level = HIDDEN, + ) public fun getDiscoverySplashUrl(format: Image.Format): String? = + getDiscoverySplashUrl0(format) + + private fun getDiscoverySplashUrl0(format: Image.Format) = splashHash?.let { "discovery-splashes/$id/${it}.${format.extension}" } /** @@ -417,8 +449,10 @@ public class Guild( * * This property is not resolvable through cache and will always use the [RestClient] instead. */ + @Suppress("DEPRECATION_ERROR") + @Deprecated("Old method", ReplaceWith("this.discoverySplash?.getImage(format)"), level = HIDDEN) public suspend fun getDiscoverySplash(format: Image.Format): Image? { - val url = getDiscoverySplashUrl(format) ?: return null + val url = getDiscoverySplashUrl0(format) ?: return null return Image.fromUrl(kord.resources.httpClient, url) } @@ -426,14 +460,20 @@ public class Guild( /** * Gets the icon url, if present. */ + @Deprecated("Old method", ReplaceWith("this.icon?.cdnUrl?.toUrl { this@toUrl.format = format }"), level = HIDDEN) public fun getIconUrl(format: Image.Format): String? = + getIconUrl0(format) + + private fun getIconUrl0(format: Image.Format) = data.icon?.let { "https://cdn.discordapp.com/icons/$id/$it.${format.extension}" } /** * Requests to get the icon image in the specified [format], if present. */ + @Suppress("DEPRECATION_ERROR") + @Deprecated("Old method", ReplaceWith("this.icon?.getImage(format)"), level = HIDDEN) public suspend fun getIcon(format: Image.Format): Image? { - val url = getIconUrl(format) ?: return null + val url = getIconUrl0(format) ?: return null return Image.fromUrl(kord.resources.httpClient, url) } @@ -470,14 +510,20 @@ public class Guild( /** * Gets the splash url in the specified [format], if present. */ + @Deprecated("Old method", ReplaceWith("this.splash?.cdnUrl?.toUrl { this@toUrl.format = format }"), HIDDEN) public fun getSplashUrl(format: Image.Format): String? = + getSplashUrl0(format) + + private fun getSplashUrl0(format: Image.Format) = data.splash.value?.let { "https://cdn.discordapp.com/splashes/$id/$it.${format.extension}" } /** * Requests to get the splash image in the specified [format], if present. */ + @Suppress("DEPRECATION_ERROR") + @Deprecated("Old method", ReplaceWith("this.splash?.getImage(format)"), HIDDEN) public suspend fun getSplash(format: Image.Format): Image? { - val url = getSplashUrl(format) ?: return null + val url = getSplashUrl0(format) ?: return null return Image.fromUrl(kord.resources.httpClient, url) } diff --git a/core/src/commonMain/kotlin/entity/GuildScheduledEvent.kt b/core/src/commonMain/kotlin/entity/GuildScheduledEvent.kt index 71568bb7e274..62cb1a2bbd66 100644 --- a/core/src/commonMain/kotlin/entity/GuildScheduledEvent.kt +++ b/core/src/commonMain/kotlin/entity/GuildScheduledEvent.kt @@ -119,6 +119,8 @@ public class GuildScheduledEvent( /** The cover image hash of this event. */ public val imageHash: String? get() = data.image.value + public val image: Asset? get() = imageHash?.let { Asset.guildScheduledEventCover(id, it, kord) } + /** * Requests the [Guild] this event belongs to. * diff --git a/core/src/commonMain/kotlin/entity/Icon.kt b/core/src/commonMain/kotlin/entity/Icon.kt index 1aec2e489174..717c38b2eaca 100644 --- a/core/src/commonMain/kotlin/entity/Icon.kt +++ b/core/src/commonMain/kotlin/entity/Icon.kt @@ -14,6 +14,12 @@ import dev.kord.rest.route.DiscordCdn * @param animated Whether the Icon is animated orn ot * @param cdnUrl The [URL][CdnUrl] for the icon */ +@Suppress("DEPRECATION_ERROR") +@Deprecated( + "Icon class does not cover all cdn endpoints and has some inconsistencies.", + ReplaceWith("Asset", "dev.kord.core.entity.Asset"), + DeprecationLevel.HIDDEN +) public sealed class Icon( public val format: Image.Format, public val animated: Boolean, @@ -75,14 +81,12 @@ public sealed class Icon( public class EmojiIcon(animated: Boolean, emojiId: Snowflake, kord: Kord) : Icon(if (animated) Image.Format.GIF else Image.Format.WEBP, animated, DiscordCdn.emoji(emojiId), kord) - /** - * Represents an [Icon] as a Default user avatar - * - * @param discriminator The 4 digit discriminator that follows a discord username. (e.g. User#1234's discriminator is 1234) - * @param kord The Kord instance that created this object - */ - public class DefaultUserAvatar(discriminator: Int, kord: Kord) : - Icon(Image.Format.PNG /* Discord Default Avatars only support PNG */, false, DiscordCdn.defaultAvatar(discriminator), kord) + public class DefaultUserAvatar private constructor(cdnUrl: CdnUrl, kord: Kord) : + Icon(Image.Format.PNG /* Discord Default Avatars only support PNG */, false, cdnUrl, kord) { + @Suppress("DEPRECATION") + public constructor(discriminator: Int, kord: Kord) : this(DiscordCdn.defaultAvatar(discriminator), kord) + internal constructor(userId: Snowflake, kord: Kord) : this(DiscordCdn.defaultUserAvatar(userId), kord) + } /** * Represents an [Icon] as a User Avatar diff --git a/core/src/commonMain/kotlin/entity/Member.kt b/core/src/commonMain/kotlin/entity/Member.kt index 713fde9af6eb..d59387c2600e 100644 --- a/core/src/commonMain/kotlin/entity/Member.kt +++ b/core/src/commonMain/kotlin/entity/Member.kt @@ -35,15 +35,33 @@ public class Member( get() = memberData.guildId /** - * The name as shown in the discord client, prioritizing the [nickname] over the [use]. + * The name as shown in the discord client, prioritizing [nickname] over [globalName] and [username]. */ - public val displayName: String get() = nickname ?: username + @Deprecated( + "This was renamed to 'effectiveName' to avoid confusion with 'User.globalName' which is also called display " + + "name.", + ReplaceWith("this.effectiveName"), + DeprecationLevel.ERROR, + ) + public val displayName: String get() = effectiveName + + /** + * The member's effective name, prioritizing [nickname] over [globalName] and [username]. + */ + public val effectiveName: String get() = nickname ?: (this as User).effectiveName /** * The members guild avatar as [Icon] object */ - public val memberAvatar: Icon? - get() = memberData.avatar.value?.let { Icon.MemberAvatar(memberData.guildId, data.id, it, kord) } + @Suppress("DEPRECATION_ERROR") + @Deprecated("Binary compatibility", level = DeprecationLevel.HIDDEN) + public fun getMemberAvatar(): Icon? = + memberData.avatar.value?.let { Icon.MemberAvatar(memberData.guildId, id, it, kord) } + + public val memberAvatarHash: String? get() = memberData.avatar.value + + /** The guild avatar of this member as an [Asset]. */ + public val memberAvatar: Asset? get() = memberAvatarHash?.let { Asset.memberAvatar(guildId, id, it, kord) } /** * When the user joined this [guild]. diff --git a/core/src/commonMain/kotlin/entity/Message.kt b/core/src/commonMain/kotlin/entity/Message.kt index f61ff85b6a60..aa12ef8e9f40 100644 --- a/core/src/commonMain/kotlin/entity/Message.kt +++ b/core/src/commonMain/kotlin/entity/Message.kt @@ -309,29 +309,17 @@ public class Message( */ override suspend fun asMessage(): Message = this - /** - * Requests to get the [author] as a member. - * - * Returns null if the message was not send in a [TopGuildMessageChannel], or if the [author] is not a [User]. - */ - @Deprecated( - "Deprecated in favour of getAuthorAsMemberOrNull(), as it more accurately describes function", - ReplaceWith("getAuthorAsMemberOrNull()"), - DeprecationLevel.ERROR - ) - public suspend fun getAuthorAsMember(): Member? { - val author = author ?: return null - val guildId = getGuildOrNull()?.id ?: return null - return author.asMember(guildId) - } + @Deprecated("Renamed to 'getAuthorAsMember'.", ReplaceWith("this.getAuthorAsMember()"), DeprecationLevel.WARNING) + public suspend fun getAuthorAsMemberOrThrow(): Member = getAuthorAsMember() /** * Requests to get the [author] as a member. * + * @throws RequestException if anything went wrong during the request. * @throws EntityNotFoundException if the message was not sent in a [TopGuildMessageChannel], if the member was not found * or if the guild was null, or if the author is not a user */ - public suspend fun getAuthorAsMemberOrThrow(): Member { + public suspend fun getAuthorAsMember(): Member { val author = author ?: throw EntityNotFoundException("Author is not a Discord User") val guildId = getGuild().id return author.asMember(guildId) @@ -342,6 +330,8 @@ public class Message( * * Returns null if the message was not sent in a [TopGuildMessageChannel], if the [author] is not a [User], or if * the [author] as a member is `null`. + * + * @throws RequestException if anything went wrong during the request. */ public suspend fun getAuthorAsMemberOrNull(): Member? { val author = author ?: return null diff --git a/core/src/commonMain/kotlin/entity/PartialGuild.kt b/core/src/commonMain/kotlin/entity/PartialGuild.kt index 61180568ff19..7343e4ad8dee 100644 --- a/core/src/commonMain/kotlin/entity/PartialGuild.kt +++ b/core/src/commonMain/kotlin/entity/PartialGuild.kt @@ -16,6 +16,7 @@ import dev.kord.core.supplier.EntitySupplier import dev.kord.core.supplier.EntitySupplyStrategy import dev.kord.rest.Image import dev.kord.rest.service.RestClient +import kotlin.DeprecationLevel.HIDDEN /** * Represents a [Partial guild object](https://discord.com/developers/docs/resources/guild#unavailable-guild-object). @@ -41,6 +42,8 @@ public class PartialGuild( */ public val iconHash: String? get() = data.icon + public val icon: Asset? get() = iconHash?.let { Asset.guildIcon(id, it, kord) } + /** * Whether who created the invite is the owner or not. */ @@ -93,11 +96,24 @@ public class PartialGuild( */ public val splashHash: String? get() = data.splash.value + public val splash: Asset? get() = splashHash?.let { Asset.guildSplash(id, it, kord) } + + public val bannerHash: String? get() = data.banner.value + + public val banner: Asset? get() = bannerHash?.let { Asset.guildBanner(id, it, kord) } /** * Gets the discovery splash url in the specified [format], if present. */ + @Deprecated( + "This method uses the wrong hash.", + ReplaceWith("this.splash?.cdnUrl?.toUrl { this@toUrl.format = format }"), + level = HIDDEN, + ) public fun getDiscoverySplashUrl(format: Image.Format): String? = + getDiscoverySplashUrl0(format) + + private fun getDiscoverySplashUrl0(format: Image.Format) = splashHash?.let { "discovery-splashes/$id/${it}.${format.extension}" } /** @@ -105,8 +121,14 @@ public class PartialGuild( * * This property is not resolvable through cache and will always use the [RestClient] instead. */ + @Suppress("DEPRECATION_ERROR") + @Deprecated( + "This method uses the wrong hash.", + ReplaceWith("this.splash?.getImage(format)"), + level = HIDDEN, + ) public suspend fun getDiscoverySplash(format: Image.Format): Image? { - val url = getDiscoverySplashUrl(format) ?: return null + val url = getDiscoverySplashUrl0(format) ?: return null return Image.fromUrl(kord.resources.httpClient, url) } @@ -115,15 +137,21 @@ public class PartialGuild( /** * Gets the icon url, if present. */ + @Deprecated("Old method", ReplaceWith("this.icon?.cdnUrl?.toUrl { this@toUrl.format = format }"), level = HIDDEN) public fun getIconUrl(format: Image.Format): String? = + getIconUrl0(format) + + private fun getIconUrl0(format: Image.Format): String? = iconHash?.let { "https://cdn.discordapp.com/icons/$id/$it.${format.extension}" } /** * Requests to get the icon image in the specified [format], if present. */ + @Suppress("DEPRECATION_ERROR") + @Deprecated("Old method", ReplaceWith("this.icon?.getImage(format)"), level = HIDDEN) public suspend fun getIcon(format: Image.Format): Image? { - val url = getIconUrl(format) ?: return null + val url = getIconUrl0(format) ?: return null return Image.fromUrl(kord.resources.httpClient, url) } @@ -132,14 +160,20 @@ public class PartialGuild( /** * Gets the banner url in the specified format. */ + @Deprecated("Old method", ReplaceWith("this.banner?.cdnUrl?.toUrl { this@toUrl.format = format }"), level = HIDDEN) public fun getBannerUrl(format: Image.Format): String? = + getBannerUrl0(format) + + private fun getBannerUrl0(format: Image.Format) = data.banner.value?.let { "https://cdn.discordapp.com/banners/$id/$it.${format.extension}" } /** * Requests to get the banner image in the specified [format], if present. */ + @Suppress("DEPRECATION_ERROR") + @Deprecated("Old method", ReplaceWith("this.banner?.getImage(format)"), level = HIDDEN) public suspend fun getBanner(format: Image.Format): Image? { - val url = getBannerUrl(format) ?: return null + val url = getBannerUrl0(format) ?: return null return Image.fromUrl(kord.resources.httpClient, url) } diff --git a/core/src/commonMain/kotlin/entity/PermissionOverwrite.kt b/core/src/commonMain/kotlin/entity/PermissionOverwrite.kt index 044f99b3683a..588b11f1356a 100644 --- a/core/src/commonMain/kotlin/entity/PermissionOverwrite.kt +++ b/core/src/commonMain/kotlin/entity/PermissionOverwrite.kt @@ -1,6 +1,5 @@ package dev.kord.core.entity -import dev.kord.common.entity.Overwrite import dev.kord.common.entity.OverwriteType import dev.kord.common.entity.Permissions import dev.kord.common.entity.Snowflake @@ -26,8 +25,6 @@ public open class PermissionOverwrite( internal fun asRequest() = ChannelPermissionEditRequest(allowed, denied, type) - internal fun toOverwrite() = Overwrite(id = target, type = type, allow = allowed, deny = denied) - override fun hashCode(): Int = target.hashCode() override fun equals(other: Any?): Boolean { val otherOverwrite = other as? PermissionOverwrite ?: return false diff --git a/core/src/commonMain/kotlin/entity/Role.kt b/core/src/commonMain/kotlin/entity/Role.kt index 38d132da1f7e..b32742428971 100644 --- a/core/src/commonMain/kotlin/entity/Role.kt +++ b/core/src/commonMain/kotlin/entity/Role.kt @@ -34,8 +34,14 @@ public data class Role( /** If this role is pinned in the user listing. */ public val hoisted: Boolean get() = data.hoisted - /** The icon of the role as an [Icon] object. */ - val icon: Icon? get() = data.icon.value?.let { Icon.RoleIcon(data.id, it, kord) } + @Suppress("DEPRECATION_ERROR") + @Deprecated("Binary compatibility", level = DeprecationLevel.HIDDEN) + public fun getIcon(): Icon? = data.icon.value?.let { Icon.RoleIcon(data.id, it, kord) } + + val iconHash: String? get() = data.icon.value + + /** The icon of the role as an [Asset] object. */ + val icon: Asset? get() = iconHash?.let { Asset.roleIcon(id, it, kord) } /** The unicode of the role emoji. */ val unicodeEmoji: String? = data.unicodeEmoji.value diff --git a/core/src/commonMain/kotlin/entity/Sticker.kt b/core/src/commonMain/kotlin/entity/Sticker.kt index 6828f0ecbc1e..5c0bd40b5d1a 100644 --- a/core/src/commonMain/kotlin/entity/Sticker.kt +++ b/core/src/commonMain/kotlin/entity/Sticker.kt @@ -57,6 +57,8 @@ public open class Sticker(public val data: StickerData, override val kord: Kord) public val formatType: MessageStickerType get() = data.formatType + public val asset: Asset get() = Asset.sticker(id, formatType, kord) + /** * Whether this guild sticker can be used. May be false due to a loss of boosts. */ @@ -122,6 +124,8 @@ public class StickerItem( public val formatType: MessageStickerType get() = data.formatType + public val asset: Asset get() = Asset.sticker(id, formatType, kord) + /** * Gets a [Sticker] from a given [id]. * returns `null` if the sticker cannot be found @@ -172,5 +176,7 @@ public class StickerPack(public val data: StickerPackData, override val kord: Ko /** A [List] of the [Sticker]s in the pack. */ public val stickers: List get() = data.stickers.map { Sticker(it, kord) } + public val bannerId: Snowflake get() = data.bannerAssetId -} \ No newline at end of file + public val banner: Asset get() = Asset.stickerPackBanner(bannerId, kord) +} diff --git a/core/src/commonMain/kotlin/entity/Team.kt b/core/src/commonMain/kotlin/entity/Team.kt index cca2073b897a..228abe9bd6d1 100644 --- a/core/src/commonMain/kotlin/entity/Team.kt +++ b/core/src/commonMain/kotlin/entity/Team.kt @@ -29,7 +29,13 @@ public class Team( /** * The hash of this team's icon. */ - public val icon: String? get() = data.icon + @Deprecated("Binary compatibility", level = DeprecationLevel.HIDDEN) + public fun getIcon(): String? = data.icon + + /** The hash of this team's icon. */ + public val iconHash: String? get() = data.icon + + public val icon: Asset? get() = iconHash?.let { Asset.teamIcon(id, it, kord) } /** * A collection of all members of this team. diff --git a/core/src/commonMain/kotlin/entity/User.kt b/core/src/commonMain/kotlin/entity/User.kt index 56800a252f20..4eb394f2134e 100644 --- a/core/src/commonMain/kotlin/entity/User.kt +++ b/core/src/commonMain/kotlin/entity/User.kt @@ -10,6 +10,24 @@ import dev.kord.core.cache.data.UserData import dev.kord.core.supplier.EntitySupplier import dev.kord.core.supplier.EntitySupplyStrategy import dev.kord.rest.Image +import kotlin.DeprecationLevel.WARNING + +/** + * The user's effective name, prioritizing [globalName][User.globalName] over [username][User.username]. + * + * #### API note: + * + * This is implemented as an extension property to avoid virtual dispatch in cases like the following: + * ```kotlin + * fun useUser(user: User) = println(user.effectiveName) + * fun useMember(member: Member) = println(member.effectiveName) + * + * val member: Member = TODO() + * useUser(member) // prints the global display name + * useMember(member) // prints the guild-specific nickname + * ``` + */ +public val User.effectiveName: String get() = globalName ?: username /** * An instance of a [Discord User](https://discord.com/developers/docs/resources/user#user-object). @@ -28,13 +46,28 @@ public open class User( /** * The users avatar as [Icon] object */ - public val avatar: Icon? - get() = data.avatar?.let { Icon.UserAvatar(data.id, it, kord) } + @Suppress("DEPRECATION_ERROR") + @Deprecated("Binary compatibility", level = DeprecationLevel.HIDDEN) + public fun getAvatar(): Icon? = data.avatar?.let { Icon.UserAvatar(data.id, it, kord) } + + public val avatarHash: String? get() = data.avatar + + /** The avatar of this user as an [Asset]. */ + public val avatar: Asset? get() = avatarHash?.let { Asset.userAvatar(data.id, it, kord) } + + @Suppress("DEPRECATION", "DEPRECATION_ERROR") + @Deprecated("Binary compatibility", level = DeprecationLevel.HIDDEN) + public fun getDefaultAvatar(): Icon = + if (migratedToNewUsernameSystem) Icon.DefaultUserAvatar(userId = id, kord) + else Icon.DefaultUserAvatar(discriminator.toInt(), kord) /** - * The default avatar for the user as [Icon] object. + * The default avatar for the user as [Asset] object. */ - public val defaultAvatar: Icon get() = Icon.DefaultUserAvatar(data.discriminator.toInt(), kord) + public val defaultAvatar: Asset + get() = + if (migratedToNewUsernameSystem) Asset.defaultUserAvatar(userId = id, kord) + else @Suppress("DEPRECATION") Asset.defaultUserAvatar(discriminator.toInt(), kord) /** * The username of this user. @@ -43,8 +76,28 @@ public open class User( /** * The 4-digit code at the end of the user's discord tag. + * + * `"0"` indicates that this user has been migrated to the new username system, see the + * [Discord Developer Platform](https://discord.com/developers/docs/change-log#unique-usernames-on-discord) for + * details. */ - public val discriminator: String get() = data.discriminator + // "0" when data.discriminator is missing: if the field is missing, all users were migrated, + // see https://discord.com/developers/docs/change-log#identifying-migrated-users: + // "After migration of all users is complete, the `discriminator` field may be removed." + @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") + @Deprecated( + "Discord's username system is changing and discriminators are being removed, see " + + "https://discord.com/developers/docs/change-log#unique-usernames-on-discord for details.", + level = WARNING, + ) + public val discriminator: String get() = data.discriminator.value ?: "0" + + // see https://discord.com/developers/docs/change-log#identifying-migrated-users + @Suppress("DEPRECATION") + private val migratedToNewUsernameSystem get() = discriminator == "0" + + /** The user's display name, if it is set. For bots, this is the application name. */ + public val globalName: String? get() = data.globalName.value override suspend fun asUser(): User { return this @@ -62,7 +115,14 @@ public open class User( /** * The complete user tag. */ - public val tag: String get() = "$username#$discriminator" + @Suppress("DEPRECATION") + @Deprecated( + "Discord's username system is changing and discriminators are being removed, see " + + "https://discord.com/developers/docs/change-log#unique-usernames-on-discord for details.", + ReplaceWith("this.username"), + level = WARNING, + ) + public val tag: String get() = if (migratedToNewUsernameSystem) username else "$username#$discriminator" /** * Whether this user is a bot account. @@ -80,9 +140,13 @@ public open class User( * @param format The [Image.Format] to return the banner in * @return The URL of the users banner */ + @Deprecated("Old method", ReplaceWith("this.banner?.cdnUrl?.toUrl { this@toUrl.format = format }"), DeprecationLevel.HIDDEN) public fun getBannerUrl(format: Image.Format): String? = data.banner?.let { "https://cdn.discordapp.com/banners/$id/$it.${format.extension}" } + public val bannerHash: String? get() = data.banner + + public val banner: Asset? get() = bannerHash?.let { Asset.userBanner(id, it, kord) } override fun hashCode(): Int = id.hashCode() @@ -105,12 +169,19 @@ public open class User( * * @param data The [UserData] to build the avatar for */ + @Deprecated("Old class", ReplaceWith("Asset", "dev.kord.core.entity.Asset"), level = DeprecationLevel.HIDDEN) public data class Avatar(val data: UserData, override val kord: Kord) : KordObject { /** * The default avatar url for this user. Discord uses this for users who don't have a custom avatar set. */ - val defaultUrl: String get() = "https://cdn.discordapp.com/embed/avatars/${data.discriminator.toInt() % 5}.png" + val defaultUrl: String + get() = "https://cdn.discordapp.com/embed/avatars/${ + when (@Suppress("DEPRECATION") val discriminator = data.discriminator.value) { + null, "0" -> (data.id.value shr 22) % 6u + else -> discriminator.toInt() % 5 + } + }.png" /** * Whether the user has set their avatar. diff --git a/core/src/commonMain/kotlin/entity/application/ApplicationRoleConnectionMetadata.kt b/core/src/commonMain/kotlin/entity/application/ApplicationRoleConnectionMetadata.kt new file mode 100644 index 000000000000..13edb858d96f --- /dev/null +++ b/core/src/commonMain/kotlin/entity/application/ApplicationRoleConnectionMetadata.kt @@ -0,0 +1,49 @@ +package dev.kord.core.entity.application + +import dev.kord.common.Locale +import dev.kord.common.entity.ApplicationRoleConnectionMetadataType +import dev.kord.common.entity.DiscordApplicationRoleConnectionMetadata +import dev.kord.core.Kord +import dev.kord.core.KordObject +import dev.kord.core.entity.Application +import dev.kord.core.entity.Guild + +/** + * A representation of role connection metadata for an [Application]. + * + * When a [Guild] has added a bot and that bot has configured its + * [roleConnectionsVerificationUrl][Application.roleConnectionsVerificationUrl] (in the developer portal), the + * application will render as a potential verification method in the guild's role verification configuration. + * + * If an application has configured role connection metadata, its metadata will appear in the role verification + * configuration when the application has been added as a verification method to the role. + * + * When a user connects their account using the bot's + * [roleConnectionsVerificationUrl][Application.roleConnectionsVerificationUrl], the bot will update a user's role + * connection with metadata using the OAuth2 `role_connections.write` scope. + */ +public class ApplicationRoleConnectionMetadata( + public val data: DiscordApplicationRoleConnectionMetadata, + override val kord: Kord, +) : KordObject { + + /** The [type][ApplicationRoleConnectionMetadataType] of metadata value. */ + public val type: ApplicationRoleConnectionMetadataType get() = data.type + + /** The dictionary key for the metadata field. */ + public val key: String get() = data.key + + /** The name of the metadata field. */ + public val name: String get() = data.name + + /** The translations of the [name]. */ + public val nameLocalizations: Map get() = data.nameLocalizations.value ?: emptyMap() + + /** The description of the metadata field. */ + public val description: String get() = data.description + + /** The translations of the [description]. */ + public val descriptionLocalizations: Map get() = data.descriptionLocalizations.value ?: emptyMap() + + override fun toString(): String = "ApplicationRoleConnectionMetadata(data=$data, kord=$kord)" +} diff --git a/core/src/commonMain/kotlin/entity/automoderation/AutoModerationRule.kt b/core/src/commonMain/kotlin/entity/automoderation/AutoModerationRule.kt index 35aba19c4a8e..7b22b0c193f4 100644 --- a/core/src/commonMain/kotlin/entity/automoderation/AutoModerationRule.kt +++ b/core/src/commonMain/kotlin/entity/automoderation/AutoModerationRule.kt @@ -200,6 +200,10 @@ public class MentionSpamAutoModerationRule(data: AutoModerationRuleData, kord: K /** Total number of unique role and user mentions allowed per message. */ public val mentionLimit: Int get() = data.triggerMetadata.mentionTotalLimit.value!! + /** Whether to automatically detect mention raids. */ + public val isMentionRaidProtectionEnabled: Boolean + get() = data.triggerMetadata.mentionRaidProtectionEnabled.orElse(false) + override suspend fun asAutoModerationRuleOrNull(): MentionSpamAutoModerationRule = this override suspend fun asAutoModerationRule(): MentionSpamAutoModerationRule = this diff --git a/core/src/commonMain/kotlin/entity/channel/GuildChannel.kt b/core/src/commonMain/kotlin/entity/channel/GuildChannel.kt index 42ba57a7613d..a7c549f7626c 100644 --- a/core/src/commonMain/kotlin/entity/channel/GuildChannel.kt +++ b/core/src/commonMain/kotlin/entity/channel/GuildChannel.kt @@ -1,16 +1,7 @@ package dev.kord.core.entity.channel -import dev.kord.common.entity.OverwriteType -import dev.kord.common.entity.Permission -import dev.kord.common.entity.Permissions import dev.kord.common.entity.Snowflake -import dev.kord.common.entity.optional.orEmpty -import dev.kord.common.entity.optional.value -import dev.kord.common.exception.RequestException import dev.kord.core.behavior.channel.GuildChannelBehavior -import dev.kord.core.behavior.channel.TopGuildChannelBehavior -import dev.kord.core.cache.data.PermissionOverwriteData -import dev.kord.core.entity.PermissionOverwriteEntity import dev.kord.core.supplier.EntitySupplyStrategy /** diff --git a/core/src/commonMain/kotlin/entity/channel/StageVoiceChannel.kt b/core/src/commonMain/kotlin/entity/channel/StageVoiceChannel.kt index 31ce9c43de74..4ff86c95a68c 100644 --- a/core/src/commonMain/kotlin/entity/channel/StageVoiceChannel.kt +++ b/core/src/commonMain/kotlin/entity/channel/StageVoiceChannel.kt @@ -31,9 +31,7 @@ public class StageChannel( public val userLimit: Int get() = data.userLimit.getOrThrow() /** - * returns a new [StageChannel] with the given [strategy]. - * - * @param strategy the strategy to use for the new instance. By default [EntitySupplyStrategy.CacheWithRestFallback]. + * Returns a new [StageChannel] with the given [strategy]. */ override fun withStrategy(strategy: EntitySupplyStrategy<*>): StageChannel = StageChannel(data, kord, strategy.supply(kord)) diff --git a/core/src/commonMain/kotlin/entity/channel/VoiceChannel.kt b/core/src/commonMain/kotlin/entity/channel/VoiceChannel.kt index 46db97f0372d..2da87d5b0e44 100644 --- a/core/src/commonMain/kotlin/entity/channel/VoiceChannel.kt +++ b/core/src/commonMain/kotlin/entity/channel/VoiceChannel.kt @@ -10,13 +10,11 @@ import dev.kord.core.behavior.channel.VoiceChannelBehavior import dev.kord.core.cache.data.ChannelData import dev.kord.core.entity.Region import dev.kord.core.exception.EntityNotFoundException -import dev.kord.core.supplier.getChannelOf -import dev.kord.core.supplier.getChannelOfOrNull +import dev.kord.core.hash import dev.kord.core.supplier.EntitySupplier import dev.kord.core.supplier.EntitySupplyStrategy import kotlinx.coroutines.flow.first import kotlinx.coroutines.flow.firstOrNull -import dev.kord.core.hash /** * An instance of a Discord Voice Channel associated to a guild. diff --git a/core/src/commonMain/kotlin/entity/channel/thread/DeletedThreadChannel.kt b/core/src/commonMain/kotlin/entity/channel/thread/DeletedThreadChannel.kt index e7ab0b01470b..13e191521112 100644 --- a/core/src/commonMain/kotlin/entity/channel/thread/DeletedThreadChannel.kt +++ b/core/src/commonMain/kotlin/entity/channel/thread/DeletedThreadChannel.kt @@ -5,12 +5,10 @@ import dev.kord.common.entity.Snowflake import dev.kord.common.exception.RequestException import dev.kord.core.Kord import dev.kord.core.behavior.GuildBehavior -import dev.kord.core.behavior.channel.GuildChannelBehavior import dev.kord.core.behavior.channel.threads.ThreadParentChannelBehavior import dev.kord.core.cache.data.ChannelData import dev.kord.core.entity.Guild import dev.kord.core.entity.Strategizable -import dev.kord.core.entity.channel.GuildChannel import dev.kord.core.entity.channel.ThreadParentChannel import dev.kord.core.exception.EntityNotFoundException import dev.kord.core.supplier.EntitySupplier diff --git a/core/src/commonMain/kotlin/entity/channel/thread/NewsChannelThread.kt b/core/src/commonMain/kotlin/entity/channel/thread/NewsChannelThread.kt index 999f2e3cda81..32530c79fdf4 100644 --- a/core/src/commonMain/kotlin/entity/channel/thread/NewsChannelThread.kt +++ b/core/src/commonMain/kotlin/entity/channel/thread/NewsChannelThread.kt @@ -21,7 +21,7 @@ public class NewsChannelThread( override suspend fun asChannel(): NewsChannelThread = this - override suspend fun asChannelOrNull(): NewsChannelThread? = this + override suspend fun asChannelOrNull(): NewsChannelThread = this override suspend fun getParent(): NewsChannel { diff --git a/core/src/commonMain/kotlin/entity/component/ButtonComponent.kt b/core/src/commonMain/kotlin/entity/component/ButtonComponent.kt index 1ea403809011..c19fffa3d5d6 100644 --- a/core/src/commonMain/kotlin/entity/component/ButtonComponent.kt +++ b/core/src/commonMain/kotlin/entity/component/ButtonComponent.kt @@ -5,7 +5,9 @@ import dev.kord.common.entity.ComponentType import dev.kord.common.entity.optional.value import dev.kord.core.cache.data.ChatComponentData import dev.kord.core.entity.ReactionEmoji +import dev.kord.core.entity.interaction.ButtonInteraction import dev.kord.core.entity.interaction.ComponentInteraction +import dev.kord.core.event.interaction.InteractionCreateEvent /** * An interactive component rendered on a Message. diff --git a/core/src/commonMain/kotlin/entity/component/Component.kt b/core/src/commonMain/kotlin/entity/component/Component.kt index b3ab770b2b6d..6fe548fbb663 100644 --- a/core/src/commonMain/kotlin/entity/component/Component.kt +++ b/core/src/commonMain/kotlin/entity/component/Component.kt @@ -31,11 +31,10 @@ public sealed interface Component { * @see SelectMenuComponent * @see UnknownComponent */ -@Suppress("DEPRECATION_ERROR") public fun Component(data: ComponentData): Component = when (data.type) { ComponentType.ActionRow -> ActionRowComponent(data) ComponentType.Button -> ButtonComponent(data as ChatComponentData) - ComponentType.StringSelect, ComponentType.SelectMenu -> StringSelectComponent(data) + ComponentType.StringSelect -> StringSelectComponent(data) ComponentType.UserSelect -> UserSelectComponent(data) ComponentType.RoleSelect -> RoleSelectComponent(data) ComponentType.MentionableSelect -> MentionableSelectComponent(data) diff --git a/core/src/commonMain/kotlin/entity/component/SelectMenuComponent.kt b/core/src/commonMain/kotlin/entity/component/SelectMenuComponent.kt index eaa6047b3712..f01d42bf6ba5 100644 --- a/core/src/commonMain/kotlin/entity/component/SelectMenuComponent.kt +++ b/core/src/commonMain/kotlin/entity/component/SelectMenuComponent.kt @@ -1,5 +1,3 @@ -@file:Suppress("DEPRECATION_ERROR") - package dev.kord.core.entity.component import dev.kord.common.entity.ChannelType @@ -10,25 +8,11 @@ import dev.kord.core.cache.data.ComponentData import dev.kord.core.cache.data.SelectOptionData import dev.kord.core.entity.Message import dev.kord.core.entity.interaction.SelectMenuInteraction -import kotlin.jvm.JvmName /** - * An interactive dropdown menu rendered on a [Message] that consists of multiple [options]. + * An interactive dropdown menu rendered on a [Message]. */ - -public open class SelectMenuComponent -@Deprecated( - "This will be made a sealed class in the future, please stop using this constructor. You can instead use the " + - "constructor of one of the subtypes.", - ReplaceWith("StringSelectComponent(data)", "dev.kord.core.entity.component.StringSelectComponent"), - level = DeprecationLevel.ERROR, -) -public constructor(override val data: ComponentData) : Component { - - @Suppress("DEPRECATION", "INAPPLICABLE_JVM_NAME") - @Deprecated("Binary compatibility", level = DeprecationLevel.HIDDEN) - @get:JvmName("getType") - public open val type0: ComponentType.SelectMenu get() = ComponentType.SelectMenu +public sealed class SelectMenuComponent(override val data: ComponentData) : Component { /** * The custom identifier for any [ComponentInteractions][SelectMenuInteraction] @@ -41,25 +25,6 @@ public constructor(override val data: ComponentData) : Component { */ public val placeholder: String? get() = data.placeholder.value - /** - * The possible options to choose from. - */ - @Deprecated( - "This is only available for 'ComponentType.StringSelect' (in the 'StringSelectComponent' subclass).", - ReplaceWith( - "(this as? StringSelectComponent)?.options ?: emptyList()", - "dev.kord.core.entity.component.StringSelectComponent", - "dev.kord.core.entity.component.options", - ), - level = DeprecationLevel.ERROR, - ) - @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") - @kotlin.internal.LowPriorityInOverloadResolution - public val options: List get() = _options - - @Suppress("PropertyName") - internal val _options get() = data.options.orEmpty().map { SelectOption(it) } - /** * The minimum amount of options that can be chosen, default `1`. */ @@ -90,12 +55,15 @@ public constructor(override val data: ComponentData) : Component { public class StringSelectComponent(data: ComponentData) : SelectMenuComponent(data) { override val type: ComponentType.StringSelect get() = ComponentType.StringSelect + + /** The possible options to choose from. */ + public val options: List get() = data.options.orEmpty().map { SelectOption(it) } } -// TODO replace with member in StringSelectComponent when SelectMenuComponent.options is removed /** The possible options to choose from. */ @Suppress("EXTENSION_SHADOWED_BY_MEMBER") -public val StringSelectComponent.options: List get() = _options +@Deprecated("Replaced by member in StringSelectComponent.", ReplaceWith("this.options"), DeprecationLevel.WARNING) +public val StringSelectComponent.options: List get() = options public class UserSelectComponent(data: ComponentData) : SelectMenuComponent(data) { override val type: ComponentType.UserSelect get() = ComponentType.UserSelect diff --git a/core/src/commonMain/kotlin/entity/interaction/ComponentInteraction.kt b/core/src/commonMain/kotlin/entity/interaction/ComponentInteraction.kt index c2a6de86c70d..eb8b56485dc1 100644 --- a/core/src/commonMain/kotlin/entity/interaction/ComponentInteraction.kt +++ b/core/src/commonMain/kotlin/entity/interaction/ComponentInteraction.kt @@ -59,7 +59,6 @@ public sealed interface GuildComponentInteraction : ComponentInteraction, GuildI * * @throws Exception if the interaction is not from a [ButtonComponent] or a [SelectMenuComponent]. */ -@Suppress("DEPRECATION_ERROR") public fun ComponentInteraction( data: InteractionData, kord: Kord, @@ -74,7 +73,7 @@ public fun ComponentInteraction( } ComponentType.StringSelect, ComponentType.UserSelect, ComponentType.MentionableSelect, ComponentType.ChannelSelect, - ComponentType.RoleSelect, ComponentType.SelectMenu -> when { + ComponentType.RoleSelect -> when { inGuild -> GuildSelectMenuInteraction(data, kord, supplier) else -> GlobalSelectMenuInteraction(data, kord, supplier) } diff --git a/core/src/commonMain/kotlin/entity/interaction/OptionValue.kt b/core/src/commonMain/kotlin/entity/interaction/OptionValue.kt index 2262fd9f7033..ee6ad945ea2f 100644 --- a/core/src/commonMain/kotlin/entity/interaction/OptionValue.kt +++ b/core/src/commonMain/kotlin/entity/interaction/OptionValue.kt @@ -2,7 +2,6 @@ package dev.kord.core.entity.interaction import dev.kord.common.entity.CommandArgument import dev.kord.common.entity.Snowflake -import dev.kord.core.behavior.interaction.GlobalInteractionBehavior import dev.kord.core.entity.* import dev.kord.core.entity.channel.ResolvedChannel @@ -97,4 +96,3 @@ public fun OptionValue(value: CommandArgument<*>, resolvedObjects: ResolvedObjec } } } - diff --git a/core/src/commonMain/kotlin/entity/interaction/SelectMenuInteraction.kt b/core/src/commonMain/kotlin/entity/interaction/SelectMenuInteraction.kt index f511a969439a..92a204fbf089 100644 --- a/core/src/commonMain/kotlin/entity/interaction/SelectMenuInteraction.kt +++ b/core/src/commonMain/kotlin/entity/interaction/SelectMenuInteraction.kt @@ -4,7 +4,6 @@ import dev.kord.common.entity.optional.orEmpty import dev.kord.common.entity.optional.unwrap import dev.kord.core.Kord import dev.kord.core.cache.data.InteractionData -import dev.kord.core.cache.data.ResolvedObjectsData import dev.kord.core.entity.Guild import dev.kord.core.entity.component.SelectMenuComponent import dev.kord.core.supplier.EntitySupplier diff --git a/core/src/commonMain/kotlin/event/channel/TypingStartEvent.kt b/core/src/commonMain/kotlin/event/channel/TypingStartEvent.kt index 42bd06a84b53..650d471ede60 100644 --- a/core/src/commonMain/kotlin/event/channel/TypingStartEvent.kt +++ b/core/src/commonMain/kotlin/event/channel/TypingStartEvent.kt @@ -101,19 +101,6 @@ public class TypingStartEvent( */ public suspend fun getUserOrNull(): User? = supplier.getUserOrNull(userId) - /** - * Requests to get the guild this event was triggered in, - * returns null if the [Guild] isn't present. - * - * @throws [RequestException] if anything went wrong during the request. - */ - @Deprecated( - "Deprecated in favour of getGuildOrNull() as it provides more clarity over the functionality", - ReplaceWith("getGuildOrNull()"), - DeprecationLevel.ERROR - ) - public suspend fun getGuild(): Guild? = guildId?.let { supplier.getGuildOrNull(it) } - /** * Requests to get the guild this event was triggered in, * returns null if the [Guild] isn't present. diff --git a/core/src/commonMain/kotlin/event/channel/data/TypingStartEventData.kt b/core/src/commonMain/kotlin/event/channel/data/TypingStartEventData.kt index 6c1bdc46fa10..8fc424ab7e64 100644 --- a/core/src/commonMain/kotlin/event/channel/data/TypingStartEventData.kt +++ b/core/src/commonMain/kotlin/event/channel/data/TypingStartEventData.kt @@ -5,8 +5,7 @@ import dev.kord.common.entity.DiscordTyping import dev.kord.common.entity.Snowflake import dev.kord.common.entity.optional.Optional import dev.kord.common.entity.optional.OptionalSnowflake -import dev.kord.common.serialization.InstantInEpochSecondsSerializer -import kotlinx.datetime.Instant +import dev.kord.common.serialization.InstantInEpochSeconds import kotlinx.serialization.Serializable /** @@ -19,8 +18,7 @@ public data class TypingStartEventData( val channelId: Snowflake, val guildId: OptionalSnowflake = OptionalSnowflake.Missing, val userId: Snowflake, - @Serializable(with = InstantInEpochSecondsSerializer::class) - val timestamp: Instant, + val timestamp: InstantInEpochSeconds, val member: Optional = Optional.Missing() ) { public companion object { diff --git a/core/src/commonMain/kotlin/event/channel/thread/ThreadListSyncEvent.kt b/core/src/commonMain/kotlin/event/channel/thread/ThreadListSyncEvent.kt index a0f3aa6591ec..aa747d24f4ab 100644 --- a/core/src/commonMain/kotlin/event/channel/thread/ThreadListSyncEvent.kt +++ b/core/src/commonMain/kotlin/event/channel/thread/ThreadListSyncEvent.kt @@ -95,8 +95,12 @@ public class ThreadListSyncEvent( /** * Requests to get the channels as a [Flow] of [TopGuildChannel]s for a guild */ + public val channels: Flow get() = supplier.getGuildChannels(guildId).filter { it.id in channelIds } + + @Suppress("RedundantSuspendModifier") + @Deprecated("Replaced by 'channels' property.", ReplaceWith("this.channels"), DeprecationLevel.HIDDEN) public suspend fun getChannels(): Flow { - return supplier.getGuildChannels(guildId).filter { it.id in channelIds } + return channels } /** diff --git a/core/src/commonMain/kotlin/event/gateway/Events.kt b/core/src/commonMain/kotlin/event/gateway/Events.kt index 6187c92d3524..94c658929f4a 100644 --- a/core/src/commonMain/kotlin/event/gateway/Events.kt +++ b/core/src/commonMain/kotlin/event/gateway/Events.kt @@ -14,6 +14,8 @@ import dev.kord.gateway.Gateway import dev.kord.gateway.GatewayCloseCode import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter +import kotlin.DeprecationLevel.HIDDEN +import kotlin.jvm.JvmName /** * A Gateway recieved an event. @@ -168,7 +170,12 @@ public class ReadyEvent( * * @return A flow of [Guild]s the bot is in */ - public suspend fun getGuilds(): Flow = supplier.guilds.filter { it.id in guildIds } + public fun getGuilds(): Flow = supplier.guilds.filter { it.id in guildIds } + + @Suppress("RedundantSuspendModifier") + @Deprecated("Binary compatibility, keep for some releases.", level = HIDDEN) + @JvmName("getGuilds") + public suspend fun getGuilds0(): Flow = getGuilds() override fun withStrategy(strategy: EntitySupplyStrategy<*>): ReadyEvent = ReadyEvent(gatewayVersion, guildIds, self, sessionId, resumeGatewayUrl, kord, shard, customContext, strategy.supply(kord)) diff --git a/core/src/commonMain/kotlin/event/message/MessageBulkDeleteEvent.kt b/core/src/commonMain/kotlin/event/message/MessageBulkDeleteEvent.kt index 307d448b2abb..425416729dc5 100644 --- a/core/src/commonMain/kotlin/event/message/MessageBulkDeleteEvent.kt +++ b/core/src/commonMain/kotlin/event/message/MessageBulkDeleteEvent.kt @@ -62,19 +62,6 @@ public class MessageBulkDeleteEvent( */ public suspend fun getChannelOrNull(): MessageChannel? = supplier.getChannelOfOrNull(channelId) - /** - * Requests to get the channel triggering the event. - * Returns `null` if the guild is not present - * - * @throws [RequestException] if anything went wrong during the request. - */ - @Deprecated( - "Deprecated in favour of getGuildOrNull() as it provides more clarity over the functionality", - ReplaceWith("getGuildOrNull()"), - DeprecationLevel.ERROR - ) - public suspend fun getGuild(): Guild? = guildId?.let { supplier.getGuildOrNull(it) } - /** * Requests to get the channel triggering the event. * Returns `null` if the guild is not present diff --git a/core/src/commonMain/kotlin/event/message/MessageCreateEvent.kt b/core/src/commonMain/kotlin/event/message/MessageCreateEvent.kt index 0b36a53a474c..1b7de44f4f96 100644 --- a/core/src/commonMain/kotlin/event/message/MessageCreateEvent.kt +++ b/core/src/commonMain/kotlin/event/message/MessageCreateEvent.kt @@ -31,19 +31,6 @@ public class MessageCreateEvent( ) : Event, Strategizable { override val kord: Kord get() = message.kord - /** - * Requests to get the guild this message was created in, if it was created in one, - * returns null if the [Guild] isn't present or the message was a [DM][DmChannel]. - * - * @throws [RequestException] if anything went wrong during the request. - */ - @Deprecated( - "Deprecated in favour of getGuildOrNull() as it provides more clarity over the functionality", - ReplaceWith("getGuildOrNull()"), - DeprecationLevel.ERROR - ) - public suspend fun getGuild(): Guild? = guildId?.let { supplier.getGuildOrNull(it) } - /** * Requests to get the guild this message was created in, if it was created in one, * returns null if the [Guild] isn't present or the message was a [DM][DmChannel]. diff --git a/core/src/commonMain/kotlin/event/message/MessageDeleteEvent.kt b/core/src/commonMain/kotlin/event/message/MessageDeleteEvent.kt index 222b000154c8..1fdbf3dbfbca 100644 --- a/core/src/commonMain/kotlin/event/message/MessageDeleteEvent.kt +++ b/core/src/commonMain/kotlin/event/message/MessageDeleteEvent.kt @@ -63,19 +63,6 @@ public class MessageDeleteEvent( */ public suspend fun getChannelOrNull(): MessageChannel? = supplier.getChannelOfOrNull(channelId) - /** - * Requests to get the guild this message was created in, if it was created in one, - * returns null if the [Guild] isn't present or the message was a [DM][DmChannel]. - * - * @throws [RequestException] if anything went wrong during the request. - */ - @Deprecated( - "Deprecated in favour of getGuildOrNull() as it provides more clarity over the functionality", - ReplaceWith("getGuildOrNull()"), - DeprecationLevel.ERROR - ) - public suspend fun getGuild(): Guild? = guildId?.let { supplier.getGuildOrNull(it) } - /** * Requests to get the guild this message was created in, if it was created in one, * returns null if the [Guild] isn't present or the message was a [DM][DmChannel]. diff --git a/core/src/commonMain/kotlin/event/message/ReactionAddEvent.kt b/core/src/commonMain/kotlin/event/message/ReactionAddEvent.kt index 0be337a4aa42..a449d1ad1b55 100644 --- a/core/src/commonMain/kotlin/event/message/ReactionAddEvent.kt +++ b/core/src/commonMain/kotlin/event/message/ReactionAddEvent.kt @@ -80,19 +80,6 @@ public class ReactionAddEvent( */ public suspend fun getChannelOrNull(): MessageChannel? = supplier.getChannelOfOrNull(channelId) - /** - * Requests to get the guild triggering the event as a [Guild]. - * Returns `null` if the [Guild] wasn't present. - * - * @throws [RequestException] if anything went wrong during the request. - */ - @Deprecated( - "Deprecated in favour of getGuildOrNull() as it provides more clarity over the functionality", - ReplaceWith("getGuildOrNull()"), - DeprecationLevel.ERROR - ) - public suspend fun getGuild(): Guild? = guildId?.let { supplier.getGuildOrNull(it) } - /** * Requests to get the guild triggering the event as a [Guild]. * Returns `null` if the [Guild] wasn't present. diff --git a/core/src/commonMain/kotlin/event/message/ReactionRemoveAllEvent.kt b/core/src/commonMain/kotlin/event/message/ReactionRemoveAllEvent.kt index d0e9180f0781..f86cf5468b49 100644 --- a/core/src/commonMain/kotlin/event/message/ReactionRemoveAllEvent.kt +++ b/core/src/commonMain/kotlin/event/message/ReactionRemoveAllEvent.kt @@ -66,19 +66,6 @@ public class ReactionRemoveAllEvent( */ public suspend fun getChannelOrNull(): MessageChannel? = supplier.getChannelOfOrNull(channelId) - /** - * Requests to get the guild triggering the event as a [Guild]. - * Returns `null` if the [Guild] wasn't present. - * - * @throws [RequestException] if anything went wrong during the request. - */ - @Deprecated( - "Deprecated in favour of getGuildOrNull() as it provides more clarity over the functionality", - ReplaceWith("getGuildOrNull()"), - DeprecationLevel.ERROR - ) - public suspend fun getGuild(): Guild? = guildId?.let { supplier.getGuildOrNull(it) } - /** * Requests to get the guild triggering the event as a [Guild]. * Returns `null` if the [Guild] wasn't present. diff --git a/core/src/commonMain/kotlin/event/message/ReactionRemoveEvent.kt b/core/src/commonMain/kotlin/event/message/ReactionRemoveEvent.kt index 6c26a9fa2e70..de4b8da89c12 100644 --- a/core/src/commonMain/kotlin/event/message/ReactionRemoveEvent.kt +++ b/core/src/commonMain/kotlin/event/message/ReactionRemoveEvent.kt @@ -81,19 +81,6 @@ public class ReactionRemoveEvent( */ public suspend fun getChannelOrNull(): MessageChannel? = supplier.getChannelOfOrNull(channelId) - /** - * Requests to get the guild triggering the event as a [Guild] - * - * @throws [RequestException] if anything went wrong during the request. - * @throws [EntityNotFoundException] if the [Guild] wasn't present. - */ - @Deprecated( - "Deprecated in favour of getGuildOrNull() as it provides more clarity over the functionality", - ReplaceWith("getGuildOrNull()"), - DeprecationLevel.ERROR - ) - public suspend fun getGuild(): Guild? = guildId?.let { supplier.getGuildOrNull(it) } - /** * Requests to get the guild triggering the event as a [Guild]. * Returns `null` if the [Guild] wasn't present. diff --git a/core/src/commonMain/kotlin/gateway/handler/ChannelEventHandler.kt b/core/src/commonMain/kotlin/gateway/handler/ChannelEventHandler.kt index 1b742762f725..37d2b3f9c4a4 100644 --- a/core/src/commonMain/kotlin/gateway/handler/ChannelEventHandler.kt +++ b/core/src/commonMain/kotlin/gateway/handler/ChannelEventHandler.kt @@ -52,7 +52,7 @@ internal class ChannelEventHandler : BaseGatewayEventHandler() { private suspend fun handle(event: ChannelUpdate, shard: Int, kord: Kord, context: LazyContext?): ChannelUpdateEvent? { val data = ChannelData.from(event.channel) - val oldData = kord.cache.query { idEq(ChannelData::id, data.id) }.singleOrNull() + val oldData = kord.cache.query { idEq(ChannelData::id, data.id) }.singleOrNull() kord.cache.put(data) val old = oldData?.let { Channel.from(it, kord) } val coreEvent = when (val channel = Channel.from(data, kord)) { @@ -72,7 +72,7 @@ internal class ChannelEventHandler : BaseGatewayEventHandler() { } private suspend fun handle(event: ChannelDelete, shard: Int, kord: Kord, context: LazyContext?): ChannelDeleteEvent? { - kord.cache.remove { idEq(ChannelData::id, event.channel.id) } + kord.cache.remove { idEq(ChannelData::id, event.channel.id) } val data = ChannelData.from(event.channel) val coreEvent = when (val channel = Channel.from(data, kord)) { @@ -104,7 +104,7 @@ internal class ChannelEventHandler : BaseGatewayEventHandler() { context?.get(), ) - kord.cache.query { idEq(ChannelData::id, channelId) }.update { + kord.cache.query { idEq(ChannelData::id, channelId) }.update { it.copy(lastPinTimestamp = lastPinTimestamp) } diff --git a/core/src/commonMain/kotlin/gateway/handler/GuildEventHandler.kt b/core/src/commonMain/kotlin/gateway/handler/GuildEventHandler.kt index 9da19e3ccd9e..2d40f8851744 100644 --- a/core/src/commonMain/kotlin/gateway/handler/GuildEventHandler.kt +++ b/core/src/commonMain/kotlin/gateway/handler/GuildEventHandler.kt @@ -4,6 +4,7 @@ import dev.kord.cache.api.DataCache import dev.kord.cache.api.put import dev.kord.cache.api.putAll import dev.kord.cache.api.query +import dev.kord.common.entity.DiscordGuild import dev.kord.common.entity.optional.optionalSnowflake import dev.kord.common.entity.optional.orEmpty import dev.kord.core.Kord @@ -19,7 +20,6 @@ import dev.kord.gateway.* import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.singleOrNull import kotlinx.coroutines.flow.toSet -import dev.kord.common.entity.DiscordGuild as GatewayGuild import dev.kord.core.event.Event as CoreEvent internal class GuildEventHandler : BaseGatewayEventHandler() { @@ -55,7 +55,7 @@ internal class GuildEventHandler : BaseGatewayEventHandler() { else -> null } - private suspend fun GatewayGuild.cache(cache: DataCache) { + private suspend fun DiscordGuild.cache(cache: DataCache) { for (member in members.orEmpty()) { cache.put(MemberData.from(member.user.value!!.id, id, member)) cache.put(UserData.from(member.user.value!!)) @@ -116,7 +116,7 @@ internal class GuildEventHandler : BaseGatewayEventHandler() { context: LazyContext?, ): GuildUpdateEvent { val data = GuildData.from(event.guild) - val old = kord.cache.query { idEq(GuildData::id, event.guild.id) }.singleOrNull() + val old = kord.cache.query { idEq(GuildData::id, event.guild.id) }.singleOrNull() kord.cache.put(data) event.guild.cache(kord.cache) @@ -129,7 +129,7 @@ internal class GuildEventHandler : BaseGatewayEventHandler() { kord: Kord, context: LazyContext?, ): GuildDeleteEvent = with(event.guild) { - val query = kord.cache.query { idEq(GuildData::id, id) } + val query = kord.cache.query { idEq(GuildData::id, id) } val old = query.asFlow().map { Guild(it, kord) }.singleOrNull() query.remove() @@ -173,14 +173,14 @@ internal class GuildEventHandler : BaseGatewayEventHandler() { with(event.emoji) { val data = emojis.map { EmojiData.from(guildId, it.id!!, it) } - val old = kord.cache.query { idEq(EmojiData::guildId, guildId) }.asFlow().map { + val old = kord.cache.query { idEq(EmojiData::guildId, guildId) }.asFlow().map { GuildEmoji(it, kord) }.toSet() kord.cache.putAll(data) val emojis = data.map { GuildEmoji(it, kord) } - kord.cache.query { idEq(GuildData::id, guildId) }.update { + kord.cache.query { idEq(GuildData::id, guildId) }.update { it.copy(emojis = emojis.map { emoji -> emoji.id }) } @@ -254,12 +254,12 @@ internal class GuildEventHandler : BaseGatewayEventHandler() { with(event.member) { val userData = UserData.from(user) - val oldData = kord.cache.query { + val oldData = kord.cache.query { idEq(MemberData::userId, userData.id) idEq(MemberData::guildId, guildId) }.singleOrNull() - kord.cache.query { idEq(UserData::id, userData.id) }.remove() + kord.cache.query { idEq(UserData::id, userData.id) }.remove() val user = User(userData, kord) val old = oldData?.let { Member(it, userData, kord) } @@ -277,7 +277,7 @@ internal class GuildEventHandler : BaseGatewayEventHandler() { val userData = UserData.from(user) kord.cache.put(userData) - val query = kord.cache.query { + val query = kord.cache.query { idEq(MemberData::userId, userData.id) idEq(MemberData::guildId, guildId) } @@ -309,7 +309,7 @@ internal class GuildEventHandler : BaseGatewayEventHandler() { ): RoleUpdateEvent { val data = RoleData.from(event.role) - val oldData = kord.cache.query { + val oldData = kord.cache.query { idEq(RoleData::id, data.id) idEq(RoleData::guildId, data.guildId) // TODO("Is this worth keeping?") }.singleOrNull() @@ -326,7 +326,7 @@ internal class GuildEventHandler : BaseGatewayEventHandler() { kord: Kord, context: LazyContext?, ): RoleDeleteEvent = with(event.role) { - val query = kord.cache.query { idEq(RoleData::id, event.role.id) } + val query = kord.cache.query { idEq(RoleData::id, event.role.id) } val old = run { val data = query.singleOrNull() ?: return@run null @@ -377,7 +377,7 @@ internal class GuildEventHandler : BaseGatewayEventHandler() { context: LazyContext?, ): GuildScheduledEventUpdateEvent { val eventData = GuildScheduledEventData.from(event.event) - val oldData = kord.cache.query { + val oldData = kord.cache.query { idEq(GuildScheduledEventData::id, event.event.id) }.singleOrNull() val old = oldData?.let { GuildScheduledEvent(it, kord) } @@ -393,7 +393,7 @@ internal class GuildEventHandler : BaseGatewayEventHandler() { kord: Kord, context: LazyContext?, ): GuildScheduledEventDeleteEvent { - val query = kord.cache.query { + val query = kord.cache.query { idEq(GuildScheduledEvent::id, event.event.id) } query.remove() @@ -445,14 +445,14 @@ internal class GuildEventHandler : BaseGatewayEventHandler() { with(event.presence) { val data = PresenceData.from(this.guildId.value!!, this) - val old = kord.cache.query { idEq(PresenceData::id, data.id) } + val old = kord.cache.query { idEq(PresenceData::id, data.id) } .asFlow().map { Presence(it, kord) }.singleOrNull() kord.cache.put(data) val new = Presence(data, kord) val user = kord.cache - .query { idEq(UserData::id, event.presence.user.id) } + .query { idEq(UserData::id, event.presence.user.id) } .singleOrNull() ?.let { User(it, kord) } diff --git a/core/src/commonMain/kotlin/gateway/handler/InteractionEventHandler.kt b/core/src/commonMain/kotlin/gateway/handler/InteractionEventHandler.kt index afc3184ca4d8..b7aa5650640b 100644 --- a/core/src/commonMain/kotlin/gateway/handler/InteractionEventHandler.kt +++ b/core/src/commonMain/kotlin/gateway/handler/InteractionEventHandler.kt @@ -96,7 +96,7 @@ internal class InteractionEventHandler : BaseGatewayEventHandler() { context: LazyContext?, ): ApplicationCommandDeleteEvent { val data = ApplicationCommandData.from(event.application) - kord.cache.remove { idEq(ApplicationCommandData::id, data.id) } + kord.cache.remove { idEq(ApplicationCommandData::id, data.id) } val coreEvent = when (val application = GuildApplicationCommand(data, kord.rest.interaction)) { is GuildChatInputCommand -> ChatInputCommandDeleteEvent(application, kord, shard, context?.get()) is GuildMessageCommand -> MessageCommandDeleteEvent(application, kord, shard, context?.get()) diff --git a/core/src/commonMain/kotlin/gateway/handler/MessageEventHandler.kt b/core/src/commonMain/kotlin/gateway/handler/MessageEventHandler.kt index 372b99a5bc6f..c714a4f92553 100644 --- a/core/src/commonMain/kotlin/gateway/handler/MessageEventHandler.kt +++ b/core/src/commonMain/kotlin/gateway/handler/MessageEventHandler.kt @@ -43,7 +43,7 @@ internal class MessageEventHandler : BaseGatewayEventHandler() { val data = MessageData.from(this) kord.cache.put(data) - kord.cache.query { idEq(ChannelData::id, channelId) }.update { channel -> + kord.cache.query { idEq(ChannelData::id, channelId) }.update { channel -> channel.copy( lastMessageId = data.id.optionalSnowflake(), messageCount = channel.messageCount.map { it + 1 }, @@ -72,8 +72,8 @@ internal class MessageEventHandler : BaseGatewayEventHandler() { mentions.forEach { val user = UserData.from(it) kord.cache.put(user) - it.member.value?.let { - kord.cache.put(MemberData.from(userId = user.id, guildId = guildId.value!!, it)) + it.member.value?.let { member -> + kord.cache.put(MemberData.from(userId = user.id, guildId = guildId.value!!, member)) } } @@ -86,7 +86,7 @@ internal class MessageEventHandler : BaseGatewayEventHandler() { kord: Kord, context: LazyContext?, ): MessageUpdateEvent = with(event.message) { - val query = kord.cache.query { idEq(MessageData::id, id) } + val query = kord.cache.query { idEq(MessageData::id, id) } val old = query.asFlow().map { Message(it, kord) }.singleOrNull() query.update { it + this } @@ -94,8 +94,8 @@ internal class MessageEventHandler : BaseGatewayEventHandler() { mentions.orEmpty().forEach { val user = UserData.from(it) kord.cache.put(user) - it.member.value?.let { - kord.cache.put(MemberData.from(userId = user.id, guildId = guildId.value!!, it)) + it.member.value?.let { member -> + kord.cache.put(MemberData.from(userId = user.id, guildId = guildId.value!!, member)) } } @@ -108,12 +108,12 @@ internal class MessageEventHandler : BaseGatewayEventHandler() { kord: Kord, context: LazyContext?, ): MessageDeleteEvent = with(event.message) { - val query = kord.cache.query { idEq(MessageData::id, id) } + val query = kord.cache.query { idEq(MessageData::id, id) } val removed = query.singleOrNull()?.let { Message(it, kord) } query.remove() - kord.cache.query { idEq(ChannelData::id, channelId) }.update { channel -> + kord.cache.query { idEq(ChannelData::id, channelId) }.update { channel -> channel.copy(messageCount = channel.messageCount.map { it - 1 }) } @@ -129,12 +129,12 @@ internal class MessageEventHandler : BaseGatewayEventHandler() { with(event.messageBulk) { val ids = ids.toSet() - val query = kord.cache.query { MessageData::id `in` ids } + val query = kord.cache.query { MessageData::id `in` ids } val removed = query.asFlow().map { Message(it, kord) }.toSet() query.remove() - kord.cache.query { idEq(ChannelData::id, channelId) }.update { channel -> + kord.cache.query { idEq(ChannelData::id, channelId) }.update { channel -> channel.copy(messageCount = channel.messageCount.map { it - ids.size }) } @@ -165,7 +165,7 @@ internal class MessageEventHandler : BaseGatewayEventHandler() { else -> ReactionEmoji.Custom(id, emoji.name!!, emoji.animated.orElse(false)) } - kord.cache.query { idEq(MessageData::id, messageId) }.update { + kord.cache.query { idEq(MessageData::id, messageId) }.update { val isMe = kord.selfId == event.reaction.userId val reactions = if (it.reactions.value.isNullOrEmpty()) { @@ -217,7 +217,7 @@ internal class MessageEventHandler : BaseGatewayEventHandler() { else -> ReactionEmoji.Custom(id, emoji.name ?: "", emoji.animated.orElse(false)) } - kord.cache.query { idEq(MessageData::id, messageId) }.update { + kord.cache.query { idEq(MessageData::id, messageId) }.update { val oldReactions = it.reactions.value ?: return@update it if (oldReactions.isEmpty()) return@update it @@ -258,7 +258,7 @@ internal class MessageEventHandler : BaseGatewayEventHandler() { context: LazyContext?, ): ReactionRemoveAllEvent = with(event.reactions) { - kord.cache.query { idEq(MessageData::id, messageId) } + kord.cache.query { idEq(MessageData::id, messageId) } .update { it.copy(reactions = Optional.Missing()) } ReactionRemoveAllEvent( @@ -278,7 +278,7 @@ internal class MessageEventHandler : BaseGatewayEventHandler() { context: LazyContext?, ): ReactionRemoveEmojiEvent = with(event.reaction) { - kord.cache.query { idEq(MessageData::id, messageId) } + kord.cache.query { idEq(MessageData::id, messageId) } .update { it.copy(reactions = it.reactions.map { list -> list.filter { data -> data.emojiName != emoji.name } }) } val data = ReactionRemoveEmojiData.from(this) diff --git a/core/src/commonMain/kotlin/gateway/handler/ThreadEventHandler.kt b/core/src/commonMain/kotlin/gateway/handler/ThreadEventHandler.kt index 38a257f66d16..08ffcb061ef1 100644 --- a/core/src/commonMain/kotlin/gateway/handler/ThreadEventHandler.kt +++ b/core/src/commonMain/kotlin/gateway/handler/ThreadEventHandler.kt @@ -38,7 +38,7 @@ internal class ThreadEventHandler : BaseGatewayEventHandler() { // update lastMessageId for forum channels when thread is created // (same for other channels when message is created) val parentId = channelData.parentId?.value!! - kord.cache.query { + kord.cache.query { ChannelData::type eq ChannelType.GuildForum idEq(ChannelData::id, parentId) }.update { @@ -56,7 +56,7 @@ internal class ThreadEventHandler : BaseGatewayEventHandler() { private suspend fun handle(event: ThreadUpdate, shard: Int, kord: Kord, context: LazyContext?): ThreadUpdateEvent? { val channelData = event.channel.toData() - val oldData = kord.cache.query { + val oldData = kord.cache.query { idEq(ChannelData::id, event.channel.id) idEq(ChannelData::guildId, event.channel.guildId.value) }.singleOrNull() @@ -78,7 +78,7 @@ internal class ThreadEventHandler : BaseGatewayEventHandler() { private suspend fun handle(event: ThreadDelete, shard: Int, kord: Kord, context: LazyContext?): ThreadChannelDeleteEvent { val channelData = event.channel.toData() - val cachedData = kord.cache.query { idEq(ChannelData::id, channelData.id) }.singleOrNull() + val cachedData = kord.cache.query { idEq(ChannelData::id, channelData.id) }.singleOrNull() val channel = DeletedThreadChannel(channelData, kord) val old = cachedData?.let { Channel.from(cachedData, kord) } @@ -94,7 +94,7 @@ internal class ThreadEventHandler : BaseGatewayEventHandler() { else -> UnknownChannelThreadDeleteEvent(channel, old as? ThreadChannel, shard, context?.get()) } - kord.cache.remove { idEq(ChannelData::id, channel.id) } + kord.cache.remove { idEq(ChannelData::id, channel.id) } return coreEvent } @@ -120,7 +120,7 @@ internal class ThreadEventHandler : BaseGatewayEventHandler() { private suspend fun handle(event: ThreadMembersUpdate, shard: Int, kord: Kord, context: LazyContext?): ThreadMembersUpdateEvent { val data = ThreadMembersUpdateEventData.from(event) for (removedMemberId in data.removedMemberIds.orEmpty()) { - kord.cache.remove { + kord.cache.remove { idEq(ThreadMemberData::userId, removedMemberId) idEq(ThreadMemberData::id, data.id) } diff --git a/core/src/commonMain/kotlin/gateway/handler/UserEventHandler.kt b/core/src/commonMain/kotlin/gateway/handler/UserEventHandler.kt index a4b459d74053..fe9fb3997ff6 100644 --- a/core/src/commonMain/kotlin/gateway/handler/UserEventHandler.kt +++ b/core/src/commonMain/kotlin/gateway/handler/UserEventHandler.kt @@ -23,7 +23,7 @@ internal class UserEventHandler : BaseGatewayEventHandler() { private suspend fun handle(event: UserUpdate, shard: Int, kord: Kord, context: LazyContext?): UserUpdateEvent { val data = UserData.from(event.user) - val old = kord.cache.query { idEq(UserData::id, data.id) } + val old = kord.cache.query { idEq(UserData::id, data.id) } .asFlow().map { User(it, kord) }.singleOrNull() kord.cache.put(data) diff --git a/core/src/commonMain/kotlin/gateway/handler/VoiceEventHandler.kt b/core/src/commonMain/kotlin/gateway/handler/VoiceEventHandler.kt index 3847a9a177ee..621fe0053861 100644 --- a/core/src/commonMain/kotlin/gateway/handler/VoiceEventHandler.kt +++ b/core/src/commonMain/kotlin/gateway/handler/VoiceEventHandler.kt @@ -33,7 +33,7 @@ internal class VoiceEventHandler : BaseGatewayEventHandler() { ): VoiceStateUpdateEvent { val data = VoiceStateData.from(event.voiceState.guildId.value!!, event.voiceState) - val old = kord.cache.query { idEq(VoiceStateData::id, data.id) } + val old = kord.cache.query { idEq(VoiceStateData::id, data.id) } .asFlow().map { VoiceState(it, kord) }.singleOrNull() kord.cache.put(data) diff --git a/core/src/commonMain/kotlin/live/LiveKordEntity.kt b/core/src/commonMain/kotlin/live/LiveKordEntity.kt index a5454d402acb..e7d82bcf668f 100644 --- a/core/src/commonMain/kotlin/live/LiveKordEntity.kt +++ b/core/src/commonMain/kotlin/live/LiveKordEntity.kt @@ -10,6 +10,7 @@ import dev.kord.core.kordLogger import kotlinx.coroutines.* import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.flow.* +import kotlin.coroutines.CoroutineContext /** * A Discord entity that only emits events *related* to this entity. @@ -38,9 +39,12 @@ public interface LiveKordEntity : KordEntity, CoroutineScope { @KordPreview public abstract class AbstractLiveKordEntity( final override val kord: Kord, - coroutineScope: CoroutineScope = kord + SupervisorJob(kord.coroutineContext.job) -) : LiveKordEntity, CoroutineScope by coroutineScope { + private val coroutineScope: CoroutineScope = kord + SupervisorJob(kord.coroutineContext.job) +) : LiveKordEntity, CoroutineScope { + final override val coroutineContext: CoroutineContext + get() = coroutineScope.coroutineContext + @Suppress("LeakingThis") // only used as CoroutineScope; coroutineContext can not be overridden in subclasses final override val events: SharedFlow = kord.events.filter { filter(it) }.onEach { update(it) }.shareIn(this, SharingStarted.Eagerly) diff --git a/core/src/commonMain/kotlin/supplier/CacheEntitySupplier.kt b/core/src/commonMain/kotlin/supplier/CacheEntitySupplier.kt index 8fd6f1deb3c9..8e99f8f13346 100644 --- a/core/src/commonMain/kotlin/supplier/CacheEntitySupplier.kt +++ b/core/src/commonMain/kotlin/supplier/CacheEntitySupplier.kt @@ -94,7 +94,7 @@ public class CacheEntitySupplier(private val kord: Kord) : EntitySupplier { public val members: Flow get() = cache.query().asFlow().mapNotNull { val userData = - cache.query { idEq(UserData::id, it.userId) }.singleOrNull() ?: return@mapNotNull null + cache.query { idEq(UserData::id, it.userId) }.singleOrNull() ?: return@mapNotNull null Member(it, userData, kord) } @@ -102,13 +102,13 @@ public class CacheEntitySupplier(private val kord: Kord) : EntitySupplier { * fetches all cached [Role]s */ public suspend fun getRole(id: Snowflake): Role? { - val data = cache.query { idEq(RoleData::id, id) }.singleOrNull() ?: return null + val data = cache.query { idEq(RoleData::id, id) }.singleOrNull() ?: return null return Role(data, kord) } override suspend fun getGuildPreviewOrNull(guildId: Snowflake): GuildPreview? { - val data = cache.query { idEq(GuildPreviewData::id, guildId) }.singleOrNull() ?: return null + val data = cache.query { idEq(GuildPreviewData::id, guildId) }.singleOrNull() ?: return null return GuildPreview(data, kord) } @@ -116,28 +116,28 @@ public class CacheEntitySupplier(private val kord: Kord) : EntitySupplier { override suspend fun getGuildWidgetOrNull(guildId: Snowflake): GuildWidget? = null override suspend fun getChannelOrNull(id: Snowflake): Channel? { - val data = cache.query { idEq(ChannelData::id, id) }.singleOrNull() ?: return null + val data = cache.query { idEq(ChannelData::id, id) }.singleOrNull() ?: return null return Channel.from(data, kord) } - override fun getGuildChannels(guildId: Snowflake): Flow = cache.query { + override fun getGuildChannels(guildId: Snowflake): Flow = cache.query { idEq(ChannelData::guildId, guildId) }.asFlow().map { Channel.from(it, kord) }.filterIsInstance() - override fun getChannelPins(channelId: Snowflake): Flow = cache.query { + override fun getChannelPins(channelId: Snowflake): Flow = cache.query { idEq(MessageData::channelId, channelId) idEq(MessageData::pinned, true) }.asFlow().map { Message(it, kord) } override suspend fun getGuildOrNull(id: Snowflake): Guild? { - val data = cache.query { idEq(GuildData::id, id) }.singleOrNull() ?: return null + val data = cache.query { idEq(GuildData::id, id) }.singleOrNull() ?: return null return Guild(data, kord) } override suspend fun getMemberOrNull(guildId: Snowflake, userId: Snowflake): Member? { - val userData = cache.query { idEq(UserData::id, userId) }.singleOrNull() ?: return null + val userData = cache.query { idEq(UserData::id, userId) }.singleOrNull() ?: return null - val memberData = cache.query { + val memberData = cache.query { idEq(MemberData::userId, userId) idEq(MemberData::guildId, guildId) }.singleOrNull() ?: return null @@ -146,7 +146,7 @@ public class CacheEntitySupplier(private val kord: Kord) : EntitySupplier { } override suspend fun getMessageOrNull(channelId: Snowflake, messageId: Snowflake): Message? { - val data = cache.query { idEq(MessageData::id, messageId) }.singleOrNull() + val data = cache.query { idEq(MessageData::id, messageId) }.singleOrNull() ?: return null return Message(data, kord) @@ -154,7 +154,7 @@ public class CacheEntitySupplier(private val kord: Kord) : EntitySupplier { override fun getMessagesAfter(messageId: Snowflake, channelId: Snowflake, limit: Int?): Flow { checkLimit(limit) - return cache.query { + return cache.query { idEq(MessageData::channelId, channelId) idGt(MessageData::id, messageId) }.asFlow().map { Message(it, kord) }.limit(limit) @@ -162,7 +162,7 @@ public class CacheEntitySupplier(private val kord: Kord) : EntitySupplier { override fun getMessagesBefore(messageId: Snowflake, channelId: Snowflake, limit: Int?): Flow { checkLimit(limit) - return cache.query { + return cache.query { idEq(MessageData::channelId, channelId) idLt(MessageData::id, messageId) }.asFlow().map { Message(it, kord) }.limit(limit) @@ -181,7 +181,7 @@ public class CacheEntitySupplier(private val kord: Kord) : EntitySupplier { override suspend fun getSelfOrNull(): User? = getUserOrNull(kord.selfId) override suspend fun getRoleOrNull(guildId: Snowflake, roleId: Snowflake): Role? { - val data = cache.query { + val data = cache.query { idEq(RoleData::id, roleId) idEq(RoleData::guildId, guildId) }.singleOrNull() ?: return null @@ -189,12 +189,12 @@ public class CacheEntitySupplier(private val kord: Kord) : EntitySupplier { return Role(data, kord) } - override fun getGuildRoles(guildId: Snowflake): Flow = cache.query { + override fun getGuildRoles(guildId: Snowflake): Flow = cache.query { idEq(RoleData::guildId, guildId) }.asFlow().map { Role(it, kord) } override suspend fun getGuildBanOrNull(guildId: Snowflake, userId: Snowflake): Ban? { - val data = cache.query { + val data = cache.query { idEq(BanData::userId, userId) idEq(BanData::guildId, guildId) }.singleOrNull() ?: return null @@ -203,7 +203,7 @@ public class CacheEntitySupplier(private val kord: Kord) : EntitySupplier { override fun getGuildBans(guildId: Snowflake, limit: Int?): Flow { checkLimit(limit) - return cache.query { idEq(BanData::guildId, guildId) } + return cache.query { idEq(BanData::guildId, guildId) } .asFlow() .map { Ban(it, kord) } .limit(limit) @@ -211,21 +211,21 @@ public class CacheEntitySupplier(private val kord: Kord) : EntitySupplier { override fun getGuildMembers(guildId: Snowflake, limit: Int?): Flow { checkLimit(limit) - return cache.query { idEq(MemberData::guildId, guildId) } + return cache.query { idEq(MemberData::guildId, guildId) } .asFlow() .mapNotNull { memberData -> - val userData = cache.query { idEq(UserData::id, memberData.userId) }.singleOrNull() + val userData = cache.query { idEq(UserData::id, memberData.userId) }.singleOrNull() userData?.let { Member(memberData, userData = it, kord) } } .limit(limit) } - override fun getGuildVoiceRegions(guildId: Snowflake): Flow = cache.query { + override fun getGuildVoiceRegions(guildId: Snowflake): Flow = cache.query { idEq(RegionData::guildId, guildId) }.asFlow().map { Region(it, kord) } override suspend fun getEmojiOrNull(guildId: Snowflake, emojiId: Snowflake): GuildEmoji? { - val data = cache.query { + val data = cache.query { idEq(EmojiData::guildId, guildId) idEq(EmojiData::id, emojiId) }.singleOrNull() ?: return null @@ -233,7 +233,7 @@ public class CacheEntitySupplier(private val kord: Kord) : EntitySupplier { return GuildEmoji(data, kord) } - override fun getEmojis(guildId: Snowflake): Flow = cache.query { + override fun getEmojis(guildId: Snowflake): Flow = cache.query { idEq(EmojiData::guildId, guildId) }.asFlow().map { GuildEmoji(it, kord) } @@ -244,16 +244,16 @@ public class CacheEntitySupplier(private val kord: Kord) : EntitySupplier { }.limit(limit) } - override fun getChannelWebhooks(channelId: Snowflake): Flow = cache.query { + override fun getChannelWebhooks(channelId: Snowflake): Flow = cache.query { idEq(WebhookData::channelId, channelId) }.asFlow().map { Webhook(it, kord) } - override fun getGuildWebhooks(guildId: Snowflake): Flow = cache.query { + override fun getGuildWebhooks(guildId: Snowflake): Flow = cache.query { idEq(WebhookData::guildId, guildId) }.asFlow().map { Webhook(it, kord) } override suspend fun getWebhookOrNull(id: Snowflake): Webhook? { - val data = cache.query { + val data = cache.query { idEq(WebhookData::id, id) }.singleOrNull() ?: return null @@ -261,7 +261,7 @@ public class CacheEntitySupplier(private val kord: Kord) : EntitySupplier { } override suspend fun getWebhookWithTokenOrNull(id: Snowflake, token: String): Webhook? { - val data = cache.query { + val data = cache.query { idEq(WebhookData::id, id) idEq(WebhookData::token, token) }.singleOrNull() ?: return null @@ -275,7 +275,7 @@ public class CacheEntitySupplier(private val kord: Kord) : EntitySupplier { messageId: Snowflake, threadId: Snowflake?, ): Message? { - val data = cache.query { + val data = cache.query { idEq(MessageData::webhookId, webhookId) idEq(MessageData::id, messageId) if (threadId != null) idEq(MessageData::channelId, threadId) @@ -285,13 +285,13 @@ public class CacheEntitySupplier(private val kord: Kord) : EntitySupplier { } override suspend fun getUserOrNull(id: Snowflake): User? { - val data = cache.query { idEq(UserData::id, id) }.singleOrNull() ?: return null + val data = cache.query { idEq(UserData::id, id) }.singleOrNull() ?: return null return User(data, kord) } override suspend fun getTemplateOrNull(code: String): Template? { - val data = cache.query { + val data = cache.query { idEq(TemplateData::code, code) }.singleOrNull() ?: return null @@ -299,7 +299,7 @@ public class CacheEntitySupplier(private val kord: Kord) : EntitySupplier { } override fun getTemplates(guildId: Snowflake): Flow