Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ClientUser<T>

Represents the client's user account.

see

https://discord.com/developers/docs/resources/user#user-object

Type parameters

  • T

Hierarchy

Index

Constructors

constructor

Properties

avatar

avatar: string | null

The user's avatar hash.

since

0.0.1

see

https://discord.com/developers/docs/reference#image-formatting

bot

bot: boolean

Whether or not the user belongs to an OAuth2 application.

since

0.0.1

Readonly client

client: T

discriminator

discriminator: string

The user's 4-digit discord-tag.

since

0.0.1

Optional email

email: string | null

The user's email.

since

0.0.1

Optional flags

flags: APIUserFlags

The flags on a user's account.

since

0.0.1

see

https://discord.com/developers/docs/resources/user#user-object-user-flags

Readonly id

id: string

The user's ID.

since

0.0.1

lastMessageID

lastMessageID: string | null = null

The id for the last message recieved for this user

since

0.0.3

Optional locale

locale: undefined | string

The user's chosen language option.

since

0.0.1

Optional mfaEnabled

mfaEnabled: undefined | false | true

Whether or not the user has two factor enabled on their account.

since

0.0.1

Optional premiumType

premiumType: PremiumType

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

since

0.0.1

see

https://discord.com/developers/docs/resources/user#user-object-premium-types

presence

presence: ClientPresence

The client presence.

since

0.0.1

Optional publicFlags

publicFlags: APIUserFlags

The public flags on a user's account.

since

0.0.1

see

https://discord.com/developers/docs/resources/user#user-object-user-flags

Optional system

system: undefined | false | true

Whether or not the user is an Official Discord System user (part of the urgent message system).

since

0.0.1

username

username: string

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

since

0.0.1

Optional verified

verified: undefined | false | true

Whether or not the email on this account has been verified.

since

0.0.1

Accessors

channel

createdAt

  • get createdAt(): Date

createdTimestamp

  • get createdTimestamp(): number

defaultAvatarURL

  • get defaultAvatarURL(): string | null

tag

  • get tag(): string

Methods

Protected _patch

  • _patch(data: APIUserData): this

avatarURL

  • avatarURL(options?: ImageURLOptions): string | null

clone

  • clone(): this

closeDM

displayAvatarURL

  • displayAvatarURL(options?: ImageURLOptions): string | null

modify

  • modify(__namedParameters: { avatar: undefined | null | string | MessageAttachment | Buffer | Readable; options: options }): Promise<this>

openDM

setAvatar

setUsername

  • setUsername(username: string): Promise<this>

toJSON

  • toJSON(): Record<string, any>

toString

  • toString(): string

valueOf

  • valueOf(): string

Generated using TypeDoc