Class User
Fluxer entity with client attached.
public class User : Entity, IUser, IMentionable, ISnowflake
- Inheritance
-
objectUser
- Implements
- Derived
- Extension Methods
Properties
AvatarColor
The dominant avatar color of the user as an integer.
public int? AvatarColor { get; }
Property Value
- int?
AvatarHash
The hash of the user avatar image.
public string? AvatarHash { get; }
Property Value
CreatedAt
Object created at UTC date.
public DateTimeOffset CreatedAt { get; }
Property Value
Discriminator
The four-digit discriminator tag of the user.
public string Discriminator { get; }
Property Value
DisplayName
The display name of the user, if set.
public string DisplayName { get; }
Property Value
Flags
The public flags on the user account.
public UserFlags Flags { get; }
Property Value
Id
Unique identifier (snowflake) for the object.
public ulong Id { get; }
Property Value
IsBot
Whether the user is a bot account.
public bool IsBot { get; }
Property Value
IsSystem
Whether the user is an official system user.
public bool IsSystem { get; }
Property Value
Mention
Formatted mention string for this object.
public string Mention { get; }
Property Value
MentionPreference
If a user wants to be mentioned or not in replies.
public MentionPreference MentionPreference { get; }
Property Value
Username
The username of the user, not unique across the platform.
public string Username { get; }
Property Value
Methods
Create(FluxerBaseClient, UserJson)
Create a User object from json.
public static User Create(FluxerBaseClient client, UserJson json)
Parameters
clientFluxerBaseClientjsonUserJson
Returns
GetAvatarOrDefaultUrl(int)
Get the user's avatar or fallback to default.
public string GetAvatarOrDefaultUrl(int size = 160)
Parameters
sizeint
Returns
GetAvatarUrl(int)
Get the user's avatar.
public string? GetAvatarUrl(int size = 160)
Parameters
sizeint
Returns
GetCurrentName()
Get the user's current display name or username.
public string GetCurrentName()
Returns
GetDefaultAvatarUrl()
Get the default avatar for the user.
public string GetDefaultAvatarUrl()