Properties

Link copied to clipboard
abstract val id: Snowflake

The unique identifier of this entity.

Link copied to clipboard
abstract val kord: Kord

The kord instance that created this object.

Link copied to clipboard
open val mention: String
Link copied to clipboard
abstract val supplier: EntitySupplier

The supplier used to request entities.

Functions

Link copied to clipboard
open suspend fun asMember(guildId: Snowflake): Member

Requests to get the this behavior as a Member in the Guild with the guildId.

Link copied to clipboard
open suspend fun asMemberOrNull(guildId: Snowflake): Member?

Requests to get this behavior as a Member in the Guild with the guildId, returns null if the member isn't present.

Link copied to clipboard
open suspend fun asUser(): User

Requests to get the this behavior as a User.

Link copied to clipboard
open suspend fun asUserOrNull(): User?

Requests to get this behavior as a User, returns null if the user isn't present.

Link copied to clipboard
open operator override fun compareTo(other: Entity): Int

Compares entities on id.

Link copied to clipboard
open suspend fun fetchMember(guildId: Snowflake): Member

Retrieve the Member associated with this behaviour from the provided EntitySupplier

Link copied to clipboard
open suspend fun fetchMemberOrNull(guildId: Snowflake): Member?

Retrieve the Member associated with this behaviour from the provided EntitySupplier returns null if the Member isn't present.

Link copied to clipboard
open suspend fun fetchUser(): User

Retrieve the User associated with this behaviour from the provided EntitySupplier

Link copied to clipboard
open suspend fun fetchUserOrNull(): User?

Retrieve the User associated with this behaviour from the provided EntitySupplier returns null if the User isn't present.

Link copied to clipboard
open suspend fun getDmChannel(): DmChannel

Requests to get or create a DmChannel between this bot and the user.

Link copied to clipboard
open suspend fun getDmChannelOrNull(): DmChannel?

Requests to get or create a DmChannel between this bot and the user, returns null if the user does not allow DMs.

Link copied to clipboard
open override fun withStrategy(strategy: EntitySupplyStrategy<*>): UserBehavior

Returns a copy of this class with a new supplier provided by the strategy.