Class

User

User (or bot) on Fluxer. Cached in Client and hydrated via Client.

Extends Base

Constructor

new User(client: Client, data: APIUserPartial)
ParamTypeDescription
clientClient
dataAPIUserPartial

Properties

avatar: string | null

Avatar hash (null = default avatar).

avatarColor: number | null

Accent color for the profile (24-bit RGB).

bot: boolean (readonly)

Whether this user is a bot.

client: Client (readonly)

Parent client instance.

discriminator: string

Legacy discriminator (e.g., `"0001"`).

flags: number | null

User flags bitfield (badges, staff, etc.).

globalName: string | null

Display name (preferred over username).

id: string (readonly)

User snowflake ID.

system: boolean (readonly)

Whether this is a system user (e.g., Fluxer System).

username: string

Username (not unique across the platform).

Methods

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

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

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

Size and extension options

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

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

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

Size and extension options

cdnOpts(): { mediaBase: string; staticCdnBase: string; }
createDM(): Promise<DMChannel>

Create or fetch the DM channel with this user.

displayAvatarURL(options?: { size?: number; extension?: string; }): string

User avatar URL or default avatar fallback.

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

Size and extension options

send(options: MessageSendOptions): Promise<Message>

Send a DM to this user.

ParamTypeDescription
optionsMessageSendOptions

Message content or MessageSendOptions

toString(): string

Format as a mention string (`<@id>`).