diff --git a/CHANGELOG.md b/CHANGELOG.md index b1ddc2f1dc0..7ecb35fd6cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,14 @@ * Allow adding a mentionable argument to commands +## Changes + +* Make `Intent#values` a getter function. + ## Fixes * Mentionable arguments now correctly retrieve their entity. +* `Intent#values` emitting null when filtering. # 0.7.1 diff --git a/gateway/src/main/kotlin/Intent.kt b/gateway/src/main/kotlin/Intent.kt index 9c338a0c135..dd7b1153206 100644 --- a/gateway/src/main/kotlin/Intent.kt +++ b/gateway/src/main/kotlin/Intent.kt @@ -2,6 +2,7 @@ package dev.kord.gateway import dev.kord.common.DiscordBitSet import dev.kord.common.EmptyBitSet +import dev.kord.common.entity.Permission import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable import kotlinx.serialization.descriptors.PrimitiveKind @@ -153,7 +154,8 @@ sealed class Intent(val code: DiscordBitSet) { object DirectMessageTyping : Intent(1 shl 14) companion object { @OptIn(PrivilegedIntent::class) - val values = setOf( + val values: Set + get() = setOf( DirectMessageTyping, GuildIntegrations, GuildEmojis,