Interface
ClientOptions
Configuration options for Client.
Properties
| Name | Type | Description |
|---|---|---|
| buildStrategy? | any | Custom WebSocket sharding strategy builder (e.g. WorkerShardingStrategy). |
| cache? | CacheSizeLimits | Cache size limits per bucket. Defaults to DEFAULT_CACHE_LIMITS. Pass 0 / Infinity per numeric field for unbounded; messages: false to disable message caching. |
| defaultAllowedMentions? | { parse?: Array<"roles" | "users" | "everyone">; roles?: string[]; users?: string[]; repliedUser?: boolean; } | Default allowed mentions when a send omits them (per-call wins). |
| defaultReplyPing? | boolean | Default reply ping for message.reply when ping is omitted. |
| gatewayDebug? | boolean | Emit gateway debug strings. |
| gatewayDeferHandlers? | boolean | Defer dispatch handlers to the next macrotask so WS message stays responsive. |
| guildsPerShard? | number | Guilds per shard when shardCount is 'auto'. |
| identifyFlags? | number | GatewayIdentifyFlags bitfield sent as Identify flags. |
| identifyThrottler? | any | Optional identify throttler (e.g. parent-backed when under ShardingManager). |
| ignoredEvents? | string[] | Dispatch event names to suppress for this session (ignored_events). |
| initialGuildId? | string | Prefer hydrating this guild first after READY (initial_guild_id). |
| instance? | Partial<APIInstanceEndpoints> | APIInstance | Instance endpoints for this client (API, CDN, invite, etc.). Pass a partial map to override hosted defaults, or a full discovery document. Prefer this over rest.api for multi-instance / self-hosted bots. |
| intents? | number | |
| logger? | Logger | Custom logger instance (overrides logLevel sink defaults). |
| logLevel? | LogLevel | Minimum log level for client.logger. Default: warn. |
| presence? | PresenceUpdateOptions | Initial presence on identify (also updatable via client.user.setPresence). CamelCase only; mapped to gateway wire internally. |
| rest? | Partial<ConstructorParameters<typeof REST>[]> | REST options. Prefer ClientOptions.instance for the API host. If both instance.api (or resolved default) and rest.api are set and differ, construction throws. |
| sessionStore? | any | Optional session store for RESUME across restarts (defaults to in-memory). |
| shardCount? | number | 'auto' | Total gateway shard count, or 'auto' to derive from guild count. Fluxer's /gateway/bot currently stubs shards: 1, so prefer 'auto' or an explicit count for large bots (max 2500 guilds per shard). Alias: totalShards. |
| shardIds? | number[] | Explicit shard ids this client should connect (defaults to 0..shardCount-1). Alias: shardList. |
| shardList? | number[] | Alias of shardIds. |
| suppressIntentWarning? | boolean | |
| totalShards? | number | 'auto' | Alias of shardCount (matches import('@fluxerjs/sharding').ShardingManager vocabulary). |
| waitForGuilds? | boolean | Delay Ready until all READY guilds arrive via GUILD_CREATE; queue other dispatches until then. |
| WebSocket? | new (url: string) => { send(data: string | ArrayBufferLike): void; close(code?: number): void; readyState: number; addEventListener?(type: string, listener: (e: unknown) => void): void; on?(event: string, cb: (data?: unknown) => void): void; } | Optional WebSocket constructor (e.g. ws in Node). Provide if the runtime lacks a native WebSocket implementation. |