Class

User

User (or bot) on Fluxer. Cached in client.users and hydrated via client.getOrCreateUser.

Extends Base

Constructor

new User(client: Client, data: APIUserPartial & { banner?: string | null })
client
Client
data
APIUserPartial & { banner?: string | null }

Properties

NameTypeDescription
avatarstring | nullAvatar hash (null = default avatar).
avatarColornumber | nullAccent color for the profile (24-bit RGB).
botread-onlybooleanWhether this user is a bot.
clientread-onlyClientParent client instance.
createdAtread-onlyDateDate when this account was created, derived from its snowflake ID.
createdTimestampread-onlynumberUnix timestamp (ms) when this account was created, derived from its snowflake ID.
discriminatorstringLegacy discriminator (e.g., "0001").
flagsnumber | nullUser flags bitfield (badges, staff, etc.).
globalNamestring | nullDisplay name (preferred over username).
idread-onlystringUser snowflake ID.
systemread-onlybooleanWhether this is a system user (e.g., Fluxer System).
usernamestringUsername (not unique across the platform).

Methods

.avatarURL(options?)

options?: { size?: number; extension?: string; }string | null

User avatar CDN URL (null if no custom avatar set).

options?
{ size?: number; extension?: string; }Size and extension options
client.user.avatarURL();

.bannerURL(options?)

options?: { size?: number; extension?: string; }string | null

User banner CDN URL (null if no banner set).

options?
{ size?: number; extension?: string; }Size and extension options
client.user.bannerURL();

.createDM()

Promise<DMChannel>

Create or fetch the DM channel with this user.

await client.user.createDM();

.displayAvatarURL(options?)

options?: { size?: number; extension?: string; }string

User avatar URL or default avatar fallback.

options?
{ size?: number; extension?: string; }Size and extension options
client.user.displayAvatarURL();