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
|
|||||||||||||||||||||||||||
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) 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
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