Table of Contents

Class User

Namespace
Fluxer.Net
Assembly
Fluxer.Net.dll

Fluxer entity with client attached.

public class User : Entity, IUser, IMentionable, ISnowflake
Inheritance
object
User
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

string

CreatedAt

Object created at UTC date.

public DateTimeOffset CreatedAt { get; }

Property Value

DateTimeOffset

Discriminator

The four-digit discriminator tag of the user.

public string Discriminator { get; }

Property Value

string

DisplayName

The display name of the user, if set.

public string DisplayName { get; }

Property Value

string

Flags

The public flags on the user account.

public UserFlags Flags { get; }

Property Value

UserFlags

Id

Unique identifier (snowflake) for the object.

public ulong Id { get; }

Property Value

ulong

IsBot

Whether the user is a bot account.

public bool IsBot { get; }

Property Value

bool

IsSystem

Whether the user is an official system user.

public bool IsSystem { get; }

Property Value

bool

Mention

Formatted mention string for this object.

public string Mention { get; }

Property Value

string

MentionPreference

If a user wants to be mentioned or not in replies.

public MentionPreference MentionPreference { get; }

Property Value

MentionPreference

Username

The username of the user, not unique across the platform.

public string Username { get; }

Property Value

string

Methods

Create(FluxerBaseClient, UserJson)

Create a User object from json.

public static User Create(FluxerBaseClient client, UserJson json)

Parameters

client FluxerBaseClient
json UserJson

Returns

User

GetAvatarOrDefaultUrl(int)

Get the user's avatar or fallback to default.

public string GetAvatarOrDefaultUrl(int size = 160)

Parameters

size int

Returns

string

GetAvatarUrl(int)

Get the user's avatar.

public string? GetAvatarUrl(int size = 160)

Parameters

size int

Returns

string

GetCurrentName()

Get the user's current display name or username.

public string GetCurrentName()

Returns

string

GetDefaultAvatarUrl()

Get the default avatar for the user.

public string GetDefaultAvatarUrl()

Returns

string