Interface

ClientOptions

Configuration options for Client.

Properties

NameTypeDescription
cache?CacheSizeLimitsCache 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).
defaultAllowedMentions: {
  parse: ['users'],
  repliedUser: false,
}
defaultReplyPing?booleanDefault reply ping for message.reply when ping is omitted.
gatewayDebug?booleanEmit gateway debug strings.
gatewayDeferHandlers?booleanDefer dispatch handlers to the next macrotask so WS message stays responsive.
identifyFlags?numberGatewayIdentifyFlags bitfield sent as Identify flags.
ignoredEvents?string[]Dispatch event names to suppress for this session (ignored_events).
initialGuildId?stringPrefer hydrating this guild first after READY (initial_guild_id).
instance?Partial<APIInstanceEndpoints> | APIInstanceInstance 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?numberGateway intents (Fluxer currently always sends 0). Reserved for future use.
logger?LoggerCustom logger instance (overrides logLevel sink defaults).
logLevel?LogLevelMinimum log level for client.logger. Default: warn.
presence?GatewayPresenceUpdateDataInitial presence on identify (also updatable via client.user.setPresence).
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.
suppressIntentWarning?booleanSilence the intents-not-supported warning.
waitForGuilds?booleanDelay 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.