Skip to content

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.bot : boolean

Whether the author is a bot.




Author.mention : string

A string that mentions this user.




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




Author:getAvatarUrl(size : number?, imageFormat : (".jpeg" | ".png" | ".webp" | ".gif")?) : 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.