User - truemedian/Discordia GitHub Wiki
Inherits Snowflake
Represents a single user of Discord, either a human or a bot, outside of any specific guild's context.
getAvatarURL
getDefaultAvatarURL
getPrivateChannel
send
sendf
bot
name
username
discriminator
tag
avatar
defaultAvatar
avatarURL
defaultAvatarURL
mentionString
mutualGuilds
Returns a URL that can be used to view the user's full avatar. If provided, the size must be a power of 2 while the extension must be a valid image format. If the user does not have a custom avatar, the default URL is returned.
Name Type Optional Optional size number x ext string x Returns: string
Returns a URL that can be used to view the user's default avatar.
Name Type Optional size number x Returns: string
Returns a private channel that can be used to communicate with the user. If the channel is not cached an HTTP request is made to open one.
Returns: PrivateChannel
Equivalent to
User:getPrivateChannel():send(content)
Name Type content string Returns: Message
Equivalent to
User:getPrivateChannel():sendf(content)
Name Type content string Returns: Message
Whether this user is a bot.
Type: boolean
Equivalent to
User.username
.Type: string
The name of the user. This should be between 2 and 32 characters in length.
Type: string
The discriminator of the user. This is a 4-digit string that is used to discriminate the user from other users with the same username.
Type: number
The user's username and discriminator concatenated by an
#
.Type: string
The hash for the user's custom avatar, if one is set.
Type: string|nil
The user's default avatar. See the
defaultAvatar
enumeration for a human-readable representation.Type: number
Equivalent to the result of calling
User:getAvatarURL()
.Type: string
Equivalent to the result of calling
User:getDefaultAvatarURL()
.Type: string
A string that, when included in a message content, may resolve as user notification in the official Discord client.
Type: string
A iterable cache of all guilds where this user shares a membership with the current user. The guild must be cached on the current client and the user's member object must be cached in that guild in order for it to appear here.
Type: FilteredIterable
Inherited from Container
A shortcut to the client object to which this container is visible.
Type: Client
The parent object of to which this container is a child. For example, the parent of a role is the guild in which the role exists.
Type: Container|Client
Inherited from Snowflake
The Snowflake ID that can be used to identify the object. This is guaranteed to be unique except in cases where an object shares the ID of its parent.
Type: string
The Unix time in seconds at which this object was created by Discord. Additional decimal points may be present, though only the first 3 (milliseconds) should be considered accurate.
Type: number
The date and time at which this object was created by Discord, represented as an ISO 8601 string plus microseconds when available.
Equivalent to Date.fromSnowflake(Snowflake.id):toISO()
.
Type: string