Skip to main content

Function: defineConfig()

defineConfig(config): object

Defined in: packages/bakit/src/config.ts:51

Define config object for your project. This is just a cleaner way to define config.

Parameters

config

The partial version of project config.

clientOptions?

Omit<ClientOptions, "intents"> = ...

Optional custom client options for Discord.js (excluding intents).

These are passed directly to the Client constructor when initializing the bot.

See

https://discord.js.org/docs/packages/discord.js/main/ClientOptions:Interface

entryDirectory?

string = ...

The main source directory.

Defaultvalue

src

intents?

bigint | "auto" | GatewayIntentBits[] = ...

The gateway intents to use for the Discord client.

  • auto — automatically determine the required intents.
  • bigint — a raw bitfield value representing the combined intents.
  • array — a list of individual intent flags from GatewayIntentBits.

Defaultvalue

auto

prefixes?

string[] = ...

Your bot prefixes to trigger the commands.

token

string = ...

Your Discord bot token.

Returns

The same config you provided earlier.

clientOptions?

optional clientOptions: Omit<ClientOptions, "intents">

Optional custom client options for Discord.js (excluding intents).

These are passed directly to the Client constructor when initializing the bot.

See

https://discord.js.org/docs/packages/discord.js/main/ClientOptions:Interface

entryDirectory?

optional entryDirectory: string

The main source directory.

Defaultvalue

src

intents?

optional intents: bigint | "auto" | GatewayIntentBits[]

The gateway intents to use for the Discord client.

  • auto — automatically determine the required intents.
  • bigint — a raw bitfield value representing the combined intents.
  • array — a list of individual intent flags from GatewayIntentBits.

Defaultvalue

auto

prefixes?

optional prefixes: string[]

Your bot prefixes to trigger the commands.

token

token: string

Your Discord bot token.