User
Properties
User.id : string
The user's Discord id.
User.username : string
The user's Discord username.
User.avatar : string
The user's Discord avatar hash.
User.bot : boolean
Whether the user is a bot.
Author.mention : string
A string that mentions this user.
User.globalName : string?
the user's display name on Discord.
User.publicFlags : PublicUserFlags
The user's flags.
Methods
User.new(data : dictionary) : User
This method returns a new User object.
Warning
This method is not meant to be called outside of Voyager's internal code.
Parameters
- data: A user object.
User:getAvatarUrl(size : number?, imageFormat : string?) : string?
This method will return the user's avatar url.
Warning
The size parameter can only be a power of two between 16 and 4096.
Info
If the imageFormat paramiter is left out. It will defualt to .png.
Tip
Use Enum.AvatarImageFormats to fill in the imageFormat parameter.
Parameters
- size: The desired size the avatar should be.
- imageFormat: The format the author's avatar should be returned as.
User:hasAnimatedAvatar(): boolean
This method checks whether the user has an animated avatar.