Skip to main content

Interface: SapphireClientOptions

Properties

baseUserDirectory

โ€ข Optional baseUserDirectory: null | string

The base user directory, if set to null, Sapphire will not call StoreRegistry.registerPath, meaning that you will need to manually set each folder for each store. Please read the aforementioned method's documentation for more information.

since 1.0.0

default undefined

Defined in

projects/framework/src/lib/SapphireClient.ts:36


caseInsensitiveCommands

โ€ข Optional caseInsensitiveCommands: null | boolean

Whether commands can be case insensitive

since 1.0.0

default false

Defined in

projects/framework/src/lib/SapphireClient.ts:43


caseInsensitivePrefixes

โ€ข Optional caseInsensitivePrefixes: null | boolean

Whether prefixes can be case insensitive

since 1.0.0

default false

Defined in

projects/framework/src/lib/SapphireClient.ts:50


defaultCooldown

โ€ข Optional defaultCooldown: CooldownOptions

Sets the default cooldown time for all commands.

default "No cooldown options"

Defined in

projects/framework/src/lib/SapphireClient.ts:122


defaultPrefix

โ€ข Optional defaultPrefix: SapphirePrefix

The default prefix, in case of null, only mention prefix will trigger the bot's commands.

since 1.0.0

default null

Defined in

projects/framework/src/lib/SapphireClient.ts:57


enableLoaderTraceLoggings

โ€ข Optional enableLoaderTraceLoggings: boolean

Whether or not trace logging should be enabled.

since 2.0.0

default container.logger.has(LogLevel.Trace)

Defined in

projects/framework/src/lib/SapphireClient.ts:103


fetchPrefix

โ€ข Optional fetchPrefix: SapphirePrefixHook

The prefix hook, by default it is a callback function that returns SapphireClientOptions.defaultPrefix.

since 1.0.0

default () => client.options.defaultPrefix

Defined in

projects/framework/src/lib/SapphireClient.ts:82


id

โ€ข Optional id: string

The client's ID, this is automatically set by the CoreReady event.

since 1.0.0

default this.client.user?.id ?? null

Defined in

projects/framework/src/lib/SapphireClient.ts:89


loadDefaultErrorListeners

โ€ข Optional loadDefaultErrorListeners: boolean

If Sapphire should load our pre-included error event listeners that log any encountered errors to the SapphireClient.logger instance

since 1.0.0

default true

Defined in

projects/framework/src/lib/SapphireClient.ts:110


logger

โ€ข Optional logger: ClientLoggerOptions

The logger options, defaults to an instance of Logger when ClientLoggerOptions.instance is not specified.

since 1.0.0

default { instance: new Logger(LogLevel.Info) }

Defined in

projects/framework/src/lib/SapphireClient.ts:96


regexPrefix

โ€ข Optional regexPrefix: RegExp

The regex prefix, an alternative to a mention or regular prefix to allow creating natural language command messages

since 1.0.0

example

/^(hey +)?bot[,! ]/i

// Matches:
// - hey bot,
// - hey bot!
// - hey bot
// - bot,
// - bot!
// - bot

Defined in

projects/framework/src/lib/SapphireClient.ts:75


typing

โ€ข Optional typing: boolean

Controls whether the bot will automatically appear to be typing when a command is accepted.

default false

Defined in

projects/framework/src/lib/SapphireClient.ts:116