User

User

new User(userData, client) → {User.<String, (String|undefined), (Object|undefined), String, String, (URL|undefined), (URL|undefined)>}

User constructor

Source:
Parameters:
Name Type Description
userData Object

The user data

Name Type Description
id String

The user id

botId String | undefined

The bot id

serverId Object | undefined

The server id

type String | undefined

The user type

name String

The username of the user

createdAt String

The date the user was created

banner URL | undefined

The banner of the user

avatar URL | undefined

The avatar of the user

client Client

The client instance

Returns:
Type:
User.<String, (String|undefined), (Object|undefined), String, String, (URL|undefined), (URL|undefined)>

The user id, the bot id, the server, the user type, the username of the user, the date the user was created, the banner of the user, the avatar of the user

Members

(readonly) avatar :string

The user avatar

Source:
Type:
  • string

(readonly) bannerURL :string

The user banner

Source:
Type:
  • string

(readonly) bot :boolean

The user is a bot

Source:
Type:
  • boolean

(readonly) client :Client

The client instance

Source:
Type:

(readonly) createdAt :Date

The user created at

Source:
Type:
  • Date

(readonly) createdBy :string

If the user is a bot, this show the id of user that created the bot

Source:
Type:
  • string

createdTimestamp :number

The user created at timestamp

Source:
Type:
  • number

defaultAvatarURL :string

The user default avatar

Source:
Type:
  • string

(readonly) id :string

The user id

Source:
Type:
  • string

raw :Object

The all data withot processing

Source:
Type:
  • Object

(readonly) username :string

The user name

Source:
Type:
  • string

Methods

getAvatarURL() → {string}

Function will return the user's profile picture

Source:
Returns:
Type:
string

getBannerURL() → {string|null}

Function will return the user's banner

Source:
Returns:
Type:
string | null