DiscordUser

data class DiscordUser(val id: Snowflake, val username: String, val discriminator: Optional<String> = Optional.Missing(), val globalName: Optional<String?> = Optional.Missing(), val avatar: String?, val bot: OptionalBoolean = OptionalBoolean.Missing, val system: OptionalBoolean = OptionalBoolean.Missing, val mfaEnabled: OptionalBoolean = OptionalBoolean.Missing, val locale: Optional<String> = Optional.Missing(), val verified: OptionalBoolean = OptionalBoolean.Missing, val email: Optional<String?> = Optional.Missing(), val flags: Optional<UserFlags> = Optional.Missing(), val premiumType: Optional<UserPremium> = Optional.Missing(), val publicFlags: Optional<UserFlags> = Optional.Missing(), val banner: String? = null, val accentColor: Int? = null, val avatarDecoration: Optional<String?> = Optional.Missing())(source)

A representation of the Discord User structure.

Parameters

id

The user's id.

username

the user's username, not unique across the platform.

discriminator

the 4-digit discord-tag.

avatar

the user's avatar hash.

bot

Whether the user belongs to an OAuth2 application.

system

whether the user is an Official Discord System user (part of the urgent message system).

mfaEnabled

Whether the user has two factor enabled on their account.

locale

The user's chosen language option.

verified

Whether the email on this account has been verified. Requires the email OAuth2 scope.

email

The user's email. Requires the email OAuth2 scope.

flags

The flags on a user's account. Unlike publicFlags, these are not visible to other users.

premiumType

The type of Nitro subscription on a user's account.

publicFlags

The public flags on a user's account. Unlike flags, these are visible ot other users.

banner

The user's banner hash.

accentColor

The user's banner color encoded as an integer representation of hexadecimal color code

avatarDecoration

The user's avatar decoration hash.

Constructors

Link copied to clipboard
constructor(id: Snowflake, username: String, discriminator: Optional<String> = Optional.Missing(), globalName: Optional<String?> = Optional.Missing(), avatar: String?, bot: OptionalBoolean = OptionalBoolean.Missing, system: OptionalBoolean = OptionalBoolean.Missing, mfaEnabled: OptionalBoolean = OptionalBoolean.Missing, locale: Optional<String> = Optional.Missing(), verified: OptionalBoolean = OptionalBoolean.Missing, email: Optional<String?> = Optional.Missing(), flags: Optional<UserFlags> = Optional.Missing(), premiumType: Optional<UserPremium> = Optional.Missing(), publicFlags: Optional<UserFlags> = Optional.Missing(), banner: String? = null, accentColor: Int? = null, avatarDecoration: Optional<String?> = Optional.Missing())

Properties

Link copied to clipboard
@SerialName(value = "accent_color")
val accentColor: Int? = null
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "avatar_decoration")
val avatarDecoration: Optional<String?>
Link copied to clipboard
val banner: String? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "global_name")
val globalName: Optional<String?>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "mfa_enabled")
val mfaEnabled: OptionalBoolean
Link copied to clipboard
@SerialName(value = "premium_type")
val premiumType: Optional<UserPremium>
Link copied to clipboard
@SerialName(value = "public_flags")
val publicFlags: Optional<UserFlags>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard