diff --git a/core/api/core.api b/core/api/core.api index 18cd0fb4b203..19c163b67c22 100644 --- a/core/api/core.api +++ b/core/api/core.api @@ -7113,6 +7113,7 @@ public class dev/kord/core/entity/User : dev/kord/core/behavior/UserBehavior { public final fun getUsername ()Ljava/lang/String; public fun hashCode ()I public final fun isBot ()Z + public final fun isSelf ()Z public fun toString ()Ljava/lang/String; public synthetic fun withStrategy (Ldev/kord/core/supplier/EntitySupplyStrategy;)Ldev/kord/core/behavior/UserBehavior; public synthetic fun withStrategy (Ldev/kord/core/supplier/EntitySupplyStrategy;)Ldev/kord/core/entity/Strategizable; diff --git a/core/api/core.klib.api b/core/api/core.klib.api index 51b03a3144f8..d7aa07aa4db6 100644 --- a/core/api/core.klib.api +++ b/core/api/core.klib.api @@ -9761,6 +9761,8 @@ open class dev.kord.core.entity/User : dev.kord.core.behavior/UserBehavior { // final fun (): kotlin/String? // dev.kord.core.entity/User.globalName.|(){}[0] final val isBot // dev.kord.core.entity/User.isBot|{}isBot[0] final fun (): kotlin/Boolean // dev.kord.core.entity/User.isBot.|(){}[0] + final val isSelf // dev.kord.core.entity/User.isSelf|{}isSelf[0] + final fun (): kotlin/Boolean // dev.kord.core.entity/User.isSelf.|(){}[0] final val publicFlags // dev.kord.core.entity/User.publicFlags|{}publicFlags[0] final fun (): dev.kord.common.entity/UserFlags? // dev.kord.core.entity/User.publicFlags.|(){}[0] final val tag // dev.kord.core.entity/User.tag|{}tag[0] diff --git a/core/src/commonMain/kotlin/entity/User.kt b/core/src/commonMain/kotlin/entity/User.kt index 86821c79fe28..bbcc37af6f8b 100644 --- a/core/src/commonMain/kotlin/entity/User.kt +++ b/core/src/commonMain/kotlin/entity/User.kt @@ -37,6 +37,11 @@ public open class User( override val id: Snowflake get() = data.id + /** + * Returns true if the user is the same as the bot. + */ + public val isSelf: Boolean get() = id == kord.selfId + public val avatarHash: String? get() = data.avatar /** The avatar of this user as an [Asset]. */