Skip to content

Commit

Permalink
Add new AuditLogEvents (#874)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukellmann authored Sep 18, 2023
1 parent 122349f commit 434bd27
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions common/api/common.api
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<AuditLogEvent> {
override val descriptor: SerialDescriptor =
PrimitiveSerialDescriptor("dev.kord.common.entity.AuditLogEvent", PrimitiveKind.INT)
Expand Down Expand Up @@ -392,6 +402,8 @@ public sealed class AuditLogEvent(
AutoModerationBlockMessage,
AutoModerationFlagToChannel,
AutoModerationUserCommunicationDisabled,
CreatorMonetizationRequestCreated,
CreatorMonetizationTermsAccepted,
)
}

Expand Down Expand Up @@ -455,6 +467,8 @@ public sealed class AuditLogEvent(
143 -> AutoModerationBlockMessage
144 -> AutoModerationFlagToChannel
145 -> AutoModerationUserCommunicationDisabled
150 -> CreatorMonetizationRequestCreated
151 -> CreatorMonetizationTermsAccepted
else -> Unknown(value, null)
}
}
Expand Down
2 changes: 2 additions & 0 deletions common/src/commonMain/kotlin/entity/AuditLog.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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."),
],
)

Expand Down

0 comments on commit 434bd27

Please sign in to comment.