ClientUser
Defined in: package/src/classes/ClientUser.ts:6
Class representing the user of the client
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ClientUser(
client,data):ClientUser
Defined in: package/src/classes/ClientUser.ts:16
Instantiate a new client user
Parameters
Section titled “Parameters”client
Section titled “client”Associated client
APIUser
Discord API user data
Returns
Section titled “Returns”ClientUser
ClientUser object
Overrides
Section titled “Overrides”Properties
Section titled “Properties”accentColor?
Section titled “accentColor?”
optionalaccentColor:number
Defined in: package/src/classes/User.ts:13
User banner color as an integer color, if set
Inherited from
Section titled “Inherited from”accentColorHex
Section titled “accentColorHex”accentColorHex:
string|null
Defined in: package/src/classes/User.ts:16
Accent color as a hex color string, or null
Inherited from
Section titled “Inherited from”
optionalbio:string
Defined in: package/src/classes/ClientUser.ts:8
The user’s about me (client user only)
bot:
boolean=false
Defined in: package/src/classes/User.ts:19
Whether this user is a Discord bot
Inherited from
Section titled “Inherited from”client
Section titled “client”client:
Client
Defined in: package/src/classes/User.ts:22
The client associated with this user
Inherited from
Section titled “Inherited from”discriminator
Section titled “discriminator”discriminator:
string="0"
Defined in: package/src/classes/User.ts:25
Legacy discriminator, defaults to “0” if no discriminator
Inherited from
Section titled “Inherited from”displayName?
Section titled “displayName?”
optionaldisplayName:string
Defined in: package/src/classes/User.ts:28
User’s display name, if set
Inherited from
Section titled “Inherited from”id:
string
Defined in: package/src/classes/User.ts:31
Unique user ID snowflake
Inherited from
Section titled “Inherited from”rawData
Section titled “rawData”rawData:
APIUser
Defined in: package/src/classes/User.ts:34
Raw API user data as-is
Inherited from
Section titled “Inherited from”system
Section titled “system”system:
boolean=false
Defined in: package/src/classes/User.ts:37
Whether this user is an official Discord system account
Inherited from
Section titled “Inherited from”username
Section titled “username”username:
string
Defined in: package/src/classes/User.ts:40
The user’s username (without discriminator)
Inherited from
Section titled “Inherited from”Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get tag():
string
Defined in: package/src/classes/User.ts:97
User’s username with discriminator (if has one, e.g. example#1234) or just the username if there’s no discriminator (e.g. example)
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”avatarURL()
Section titled “avatarURL()”avatarURL(
props):string|null
Defined in: package/src/classes/User.ts:72
Returns the CDN URL for the user’s avatar, or null if not set
Parameters
Section titled “Parameters”Options such as size and format
Returns
Section titled “Returns”string | null
CDN URL or null
Inherited from
Section titled “Inherited from”toString()
Section titled “toString()”toString():
string
Defined in: package/src/classes/User.ts:104
Returns
Section titled “Returns”string
Mention string for the user, e.g. <@USERID>