.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();Class
User (or bot) on Fluxer. Cached in client.users and hydrated via client.getOrCreateUser.
Extends Base
new User(client: Client, data: APIUserPartial & { banner?: string | null })ClientAPIUserPartial & { banner?: string | null }| Name | Type | Description |
|---|---|---|
| avatar | string | null | Avatar hash (null = default avatar). |
| avatarColor | number | null | Accent color for the profile (24-bit RGB). |
| banner | string | null | Banner hash for profile. |
| botread-only | boolean | Whether this user is a bot. |
| clientread-only | Client | Parent client instance. |
| createdAtread-only | Date | Date when this account was created, derived from its snowflake ID. |
| createdTimestampread-only | number | Unix timestamp (ms) when this account was created, derived from its snowflake ID. |
| discriminator | string | Legacy discriminator (e.g., "0001"). |
| flags | number | null | User flags bitfield (badges, staff, etc.). |
| globalName | string | null | Display name (preferred over username). |
| idread-only | string | User snowflake ID. |
| systemread-only | boolean | Whether this is a system user (e.g., Fluxer System). |
| username | string | Username (not unique across the platform). |
options?: { size?: number; extension?: string; } → string | null
User avatar CDN URL (null if no custom avatar set).
{ size?: number; extension?: string; }Size and extension optionsclient.user.avatarURL();options?: { size?: number; extension?: string; } → string | null
User banner CDN URL (null if no banner set).
{ size?: number; extension?: string; }Size and extension optionsclient.user.bannerURL();→ Promise<DMChannel>
Create or fetch the DM channel with this user.
await client.user.createDM();options?: { size?: number; extension?: string; } → string
User avatar URL or default avatar fallback.
{ size?: number; extension?: string; }Size and extension optionsclient.user.displayAvatarURL();options: MessagePrepareInput → Promise<Message>
Send a DM to this user.
await client.user.send(options);→ string
client.user.toString();