Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions common/api/common.api
Original file line number Diff line number Diff line change
Expand Up @@ -6837,6 +6837,14 @@ public abstract class dev/kord/common/entity/GuildFeature {
public final fun toString ()Ljava/lang/String;
}

public final class dev/kord/common/entity/GuildFeature$ActivityFeedDisabled : dev/kord/common/entity/GuildFeature {
public static final field INSTANCE Ldev/kord/common/entity/GuildFeature$ActivityFeedDisabled;
}

public final class dev/kord/common/entity/GuildFeature$ActivityFeedEnabled : dev/kord/common/entity/GuildFeature {
public static final field INSTANCE Ldev/kord/common/entity/GuildFeature$ActivityFeedEnabled;
}

public final class dev/kord/common/entity/GuildFeature$AnimatedBanner : dev/kord/common/entity/GuildFeature {
public static final field INSTANCE Ldev/kord/common/entity/GuildFeature$AnimatedBanner;
}
Expand Down
4 changes: 4 additions & 0 deletions common/api/common.klib.api
Original file line number Diff line number Diff line change
Expand Up @@ -8194,6 +8194,10 @@ sealed class dev.kord.common.entity/GuildFeature { // dev.kord.common.entity/Gui

final class Unknown : dev.kord.common.entity/GuildFeature // dev.kord.common.entity/GuildFeature.Unknown|null[0]

final object ActivityFeedDisabled : dev.kord.common.entity/GuildFeature // dev.kord.common.entity/GuildFeature.ActivityFeedDisabled|null[0]

final object ActivityFeedEnabled : dev.kord.common.entity/GuildFeature // dev.kord.common.entity/GuildFeature.ActivityFeedEnabled|null[0]

final object AnimatedBanner : dev.kord.common.entity/GuildFeature // dev.kord.common.entity/GuildFeature.AnimatedBanner|null[0]

final object AnimatedIcon : dev.kord.common.entity/GuildFeature // dev.kord.common.entity/GuildFeature.AnimatedIcon|null[0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ public sealed class GuildFeature(
`value`: String,
) : GuildFeature(value)

/**
* Guild has disabled the activity feed.
*/
public object ActivityFeedDisabled : GuildFeature("ACTIVITY_FEED_DISABLED_BY_USER")

/**
* Guild has enabled the activity feed.
*/
public object ActivityFeedEnabled : GuildFeature("ACTIVITY_FEED_ENABLED_BY_USER")

/**
* Guild has access to set an animated guild banner image.
*/
Expand Down Expand Up @@ -191,6 +201,8 @@ public sealed class GuildFeature(
*/
public val entries: List<GuildFeature> by lazy(mode = PUBLICATION) {
listOf(
ActivityFeedDisabled,
ActivityFeedEnabled,
AnimatedBanner,
AnimatedIcon,
ApplicationCommandPermissionsV2,
Expand Down Expand Up @@ -225,6 +237,8 @@ public sealed class GuildFeature(
* Returns an instance of [GuildFeature] with [GuildFeature.value] equal to the specified [value].
*/
public fun from(`value`: String): GuildFeature = when (value) {
"ACTIVITY_FEED_DISABLED_BY_USER" -> ActivityFeedDisabled
"ACTIVITY_FEED_ENABLED_BY_USER" -> ActivityFeedEnabled
"ANIMATED_BANNER" -> AnimatedBanner
"ANIMATED_ICON" -> AnimatedIcon
"APPLICATION_COMMAND_PERMISSIONS_V2" -> ApplicationCommandPermissionsV2
Expand Down
8 changes: 8 additions & 0 deletions common/src/commonMain/kotlin/entity/DiscordGuild.kt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@
STRING_KORD_ENUM, name = "GuildFeature",
docUrl = "https://discord.com/developers/docs/resources/guild#guild-object-guild-features",
entries = [
Entry(
"ActivityFeedDisabled", stringValue = "ACTIVITY_FEED_DISABLED_BY_USER",
kDoc = "Guild has disabled the activity feed."
),
Entry(
"ActivityFeedEnabled", stringValue = "ACTIVITY_FEED_ENABLED_BY_USER",
kDoc = "Guild has enabled the activity feed."
),
Entry(
"AnimatedBanner", stringValue = "ANIMATED_BANNER",
kDoc = "Guild has access to set an animated guild banner image.",
Expand Down