zumito-framework 1.13.1 → 1.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/launcher.js +3 -1
  2. package/package.json +1 -1
package/dist/launcher.js CHANGED
@@ -3,6 +3,7 @@
3
3
  import { ZumitoFramework } from './index';
4
4
  import path from 'path';
5
5
  import fs from 'fs';
6
+ import { pathToFileURL } from 'url';
6
7
  import dotenv from 'dotenv';
7
8
  import { RecursiveObjectMerger } from './services/utilities/RecursiveObjectMerger';
8
9
  dotenv.config();
@@ -30,7 +31,7 @@ if (!fs.existsSync(configFilePath)) {
30
31
  console.error(`Config file not found at ${configFilePath}. Please ensure the file exists.`);
31
32
  process.exit(1);
32
33
  }
33
- import(configFilePath)
34
+ import(pathToFileURL(configFilePath).href)
34
35
  .then(({ config: userConfig }) => {
35
36
  const config = RecursiveObjectMerger.merge(defaultConfig, userConfig);
36
37
  new ZumitoFramework(config, (bot) => {
@@ -44,6 +45,7 @@ import(configFilePath)
44
45
  console.log(`Loaded ${bot.translations.getAll().size} translations`);
45
46
  // Log number of routes registered
46
47
  console.log(`Loaded ${bot.routes.length} routes`);
48
+ userConfig.callbacks?.load?.(bot);
47
49
  });
48
50
  })
49
51
  .catch((error) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zumito-framework",
3
- "version": "1.13.1",
3
+ "version": "1.14.1",
4
4
  "description": "Discord.js bot framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",