Author
Properties
Author.id : string
The author's Discord id.
Author.username : string
The author's Discord username.
Author.avatar : string
The author's Discord avatar hash.
Author.discriminator : string
The author's Discord discriminator.
Deprecation Notice
This property has been deprecated. Please edit any code that uses it as it will be removed soon.
Author.bot : boolean
Whether the author is a bot.
Methods
Author.new(data : dictionary) : Author
This method returns a new Author object.
Warning
This method is not meant to be called outside of Voyager's internal code.
Parameters
- data: An author object.
Author:getAvatarUrl(size : number?, imageFormat : string?) : string
This method will return the author'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.
Author:hasAnimatedAvatar() : boolean
This method checks whether the author has an animated avatar.