From 434bd2794409071387ce971c094cbfc25cfa1e49 Mon Sep 17 00:00:00 2001 From: lukellmann <47486203+lukellmann@users.noreply.github.com> Date: Mon, 18 Sep 2023 17:46:42 +0200 Subject: [PATCH] Add new AuditLogEvents (#874) See https://github.com/discord/discord-api-docs/pull/6071 --- common/api/common.api | 8 ++++++++ .../kotlin/dev/kord/common/entity/AuditLogEvent.kt | 14 ++++++++++++++ common/src/commonMain/kotlin/entity/AuditLog.kt | 2 ++ 3 files changed, 24 insertions(+) diff --git a/common/api/common.api b/common/api/common.api index ac73fecb471..375dc3c25e5 100644 --- a/common/api/common.api +++ b/common/api/common.api @@ -1291,6 +1291,14 @@ public final class dev/kord/common/entity/AuditLogEvent$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class dev/kord/common/entity/AuditLogEvent$CreatorMonetizationRequestCreated : dev/kord/common/entity/AuditLogEvent { + public static final field INSTANCE Ldev/kord/common/entity/AuditLogEvent$CreatorMonetizationRequestCreated; +} + +public final class dev/kord/common/entity/AuditLogEvent$CreatorMonetizationTermsAccepted : dev/kord/common/entity/AuditLogEvent { + public static final field INSTANCE Ldev/kord/common/entity/AuditLogEvent$CreatorMonetizationTermsAccepted; +} + public final class dev/kord/common/entity/AuditLogEvent$EmojiCreate : dev/kord/common/entity/AuditLogEvent { public static final field INSTANCE Ldev/kord/common/entity/AuditLogEvent$EmojiCreate; } 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 d6d88fbeec8..483744b2c3b 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 @@ -321,6 +321,16 @@ public sealed class AuditLogEvent( */ public object AutoModerationUserCommunicationDisabled : AuditLogEvent(145) + /** + * Creator monetization request was created. + */ + public object CreatorMonetizationRequestCreated : AuditLogEvent(150) + + /** + * Creator monetization terms were accepted. + */ + public object CreatorMonetizationTermsAccepted : AuditLogEvent(151) + internal object Serializer : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("dev.kord.common.entity.AuditLogEvent", PrimitiveKind.INT) @@ -392,6 +402,8 @@ public sealed class AuditLogEvent( AutoModerationBlockMessage, AutoModerationFlagToChannel, AutoModerationUserCommunicationDisabled, + CreatorMonetizationRequestCreated, + CreatorMonetizationTermsAccepted, ) } @@ -455,6 +467,8 @@ public sealed class AuditLogEvent( 143 -> AutoModerationBlockMessage 144 -> AutoModerationFlagToChannel 145 -> AutoModerationUserCommunicationDisabled + 150 -> CreatorMonetizationRequestCreated + 151 -> CreatorMonetizationTermsAccepted else -> Unknown(value, null) } } diff --git a/common/src/commonMain/kotlin/entity/AuditLog.kt b/common/src/commonMain/kotlin/entity/AuditLog.kt index 720b0e0d0a3..314ed5d845e 100644 --- a/common/src/commonMain/kotlin/entity/AuditLog.kt +++ b/common/src/commonMain/kotlin/entity/AuditLog.kt @@ -56,6 +56,8 @@ Entry("AutoModerationBlockMessage", intValue = 143, kDoc = "Message was blocked by Auto Moderation."), Entry("AutoModerationFlagToChannel", intValue = 144, kDoc = "Message was flagged by Auto Moderation."), Entry("AutoModerationUserCommunicationDisabled", intValue = 145, kDoc = "Member was timed out by Auto Moderation."), + Entry("CreatorMonetizationRequestCreated", intValue = 150, kDoc = "Creator monetization request was created."), + Entry("CreatorMonetizationTermsAccepted", intValue = 151, kDoc = "Creator monetization terms were accepted."), ], )