Skip to content

Zumito Config

This guide will help you to understand the zumito.config.ts file.

The zumito.config.ts file must export a constant named config that implements the LauncherConfig interface.

import type { LauncherConfig } from 'zumito-framework';
export const config: LauncherConfig = {
// Your configuration here
};

The LauncherConfig interface has the following properties:

  • bundles: An array of Bundle objects. Bundles are a way to organize your bot’s code. Each bundle is a directory that contains commands, events, and other modules.
  • frameworkSettings: An object that contains the framework settings. This is where you can configure the bot’s token, prefix, and other options.

Bundles are a way to organize your bot’s code. Each bundle is a directory that contains commands, events, and other modules.

To add a bundle, you need to add a Bundle object to the bundles array in your zumito.config.ts file.

import path from 'path';
import type { LauncherConfig } from 'zumito-framework';
const __dirname = process.cwd();
export const config: LauncherConfig = {
bundles: [{
path: path.join(__dirname, "node_modules", "@zumito-team", "admin-module"),
}, {
path: path.join(__dirname, "node_modules", "@zumito-team", "user-panel-module"),
}],
};

The frameworkSettings object contains the framework settings. This is where you can configure the bot’s token, prefix, and other options.

import type { LauncherConfig } from 'zumito-framework';
export const config: LauncherConfig = {
frameworkSettings: {
discordClientOptions: {
intents: 3276799,
token: process.env.DISCORD_TOKEN!,
clientId: process.env.DISCORD_CLIENT_ID!,
},
defaultPrefix: process.env.BOT_PREFIX || "z-",
logLevel: parseInt(process.env.LOG_LEVEL || "3"),
}
};