Class
User
User (or bot) on Fluxer. Cached in Client and hydrated via Client.
Extends Base
Constructor
new User
(client: Client, data: APIUserPartial)| Param | Type | Description |
|---|---|---|
| client | Client | |
| data | APIUserPartial |
Properties
avatar
: string | nullAvatar hash (null = default avatar).
avatarColor
: number | nullAccent color for the profile (24-bit RGB).
bot
: boolean (readonly)Whether this user is a bot.
client
: Client (readonly)Parent client instance.
discriminator
: stringLegacy discriminator (e.g., `"0001"`).
flags
: number | nullUser flags bitfield (badges, staff, etc.).
globalName
: string | nullDisplay name (preferred over username).
id
: string (readonly)User snowflake ID.
system
: boolean (readonly)Whether this is a system user (e.g., Fluxer System).
username
: stringUsername (not unique across the platform).
Methods
avatarURL
(options?: { size?: number; extension?: string; }): string | nullUser avatar CDN URL (null if no custom avatar set).
| Param | Type | Description |
|---|---|---|
| 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; }): stringUser avatar URL or default avatar fallback.
| Param | Type | Description |
|---|---|---|
| options? | { size?: number; extension?: string; } | Size and extension options |
send
(options: MessageSendOptions): Promise<Message>Send a DM to this user.
| Param | Type | Description |
|---|---|---|
| options | MessageSendOptions | Message content or MessageSendOptions |
toString
(): stringFormat as a mention string (`<@id>`).