vimcord 1.0.44 → 1.0.45
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.
- package/dist/index.cjs +16 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -16
- package/dist/index.js.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -909,7 +909,7 @@ var VimcordCLI = class _VimcordCLI {
|
|
|
909
909
|
if (mode === "on") {
|
|
910
910
|
CLI.logger.log(`~ Type ${CLI.options.prefix}help to view available commands`);
|
|
911
911
|
} else {
|
|
912
|
-
CLI.logger.log(`~
|
|
912
|
+
CLI.logger.log(`~ Updated mode to "${mode}"`);
|
|
913
913
|
}
|
|
914
914
|
}
|
|
915
915
|
rl;
|
|
@@ -1693,7 +1693,7 @@ var VimcordErrorHandler = class {
|
|
|
1693
1693
|
import chalk2 from "chalk";
|
|
1694
1694
|
|
|
1695
1695
|
// package.json
|
|
1696
|
-
var version = "1.0.
|
|
1696
|
+
var version = "1.0.45";
|
|
1697
1697
|
|
|
1698
1698
|
// src/client/vimcord.logger.ts
|
|
1699
1699
|
var clientLoggerFactory = (client) => new Logger({ prefixEmoji: "\u26A1", prefix: `vimcord (i${client.clientId})` }).extend({
|
|
@@ -2637,17 +2637,11 @@ var Vimcord = class _Vimcord extends Client2 {
|
|
|
2637
2637
|
this.features = features;
|
|
2638
2638
|
this.config = defineVimcordConfig(config);
|
|
2639
2639
|
this.error = new VimcordErrorHandler(this);
|
|
2640
|
-
if (this.features.useGlobalErrorHandlers) {
|
|
2641
|
-
this.error.setupGlobalHandlers();
|
|
2642
|
-
}
|
|
2643
2640
|
this.status = new StatusManager(this);
|
|
2644
2641
|
this.events = new EventManager(this);
|
|
2645
2642
|
this.commands = new CommandManager(this);
|
|
2646
2643
|
this.once("clientReady", (client) => this.logger.clientReady(client.user.tag, client.guilds.cache.size));
|
|
2647
2644
|
_Vimcord.instances.set(this.clientId, this);
|
|
2648
|
-
if (this.config.app.enableCLI) {
|
|
2649
|
-
VimcordCLI.setMode("on");
|
|
2650
|
-
}
|
|
2651
2645
|
}
|
|
2652
2646
|
/** Builds the client by importing modules and registering builtin handlers. */
|
|
2653
2647
|
async build() {
|
|
@@ -2656,14 +2650,8 @@ var Vimcord = class _Vimcord extends Client2 {
|
|
|
2656
2650
|
this.configure("slashCommands", this.config.slashCommands);
|
|
2657
2651
|
this.configure("prefixCommands", this.config.prefixCommands);
|
|
2658
2652
|
this.configure("contextCommands", this.config.contextCommands);
|
|
2659
|
-
if (this.features.
|
|
2660
|
-
|
|
2661
|
-
await Promise.all([
|
|
2662
|
-
importModules.events && this.importModules("events", importModules.events),
|
|
2663
|
-
importModules.slashCommands && this.importModules("slashCommands", importModules.slashCommands),
|
|
2664
|
-
importModules.prefixCommands && this.importModules("prefixCommands", importModules.prefixCommands),
|
|
2665
|
-
importModules.contextCommands && this.importModules("contextCommands", importModules.contextCommands)
|
|
2666
|
-
]);
|
|
2653
|
+
if (this.features.useGlobalErrorHandlers) {
|
|
2654
|
+
this.error.setupGlobalHandlers();
|
|
2667
2655
|
}
|
|
2668
2656
|
if (this.features.useDefaultSlashCommandHandler) {
|
|
2669
2657
|
this.events.register(slashCommandHandler);
|
|
@@ -2674,6 +2662,18 @@ var Vimcord = class _Vimcord extends Client2 {
|
|
|
2674
2662
|
if (this.features.useDefaultPrefixCommandHandler) {
|
|
2675
2663
|
this.events.register(prefixCommandHandler);
|
|
2676
2664
|
}
|
|
2665
|
+
if (this.features.importModules) {
|
|
2666
|
+
const importModules = this.features.importModules;
|
|
2667
|
+
await Promise.all([
|
|
2668
|
+
importModules.events && this.importModules("events", importModules.events),
|
|
2669
|
+
importModules.slashCommands && this.importModules("slashCommands", importModules.slashCommands),
|
|
2670
|
+
importModules.prefixCommands && this.importModules("prefixCommands", importModules.prefixCommands),
|
|
2671
|
+
importModules.contextCommands && this.importModules("contextCommands", importModules.contextCommands)
|
|
2672
|
+
]);
|
|
2673
|
+
}
|
|
2674
|
+
if (this.config.app.enableCLI) {
|
|
2675
|
+
VimcordCLI.setMode("on");
|
|
2676
|
+
}
|
|
2677
2677
|
return this;
|
|
2678
2678
|
}
|
|
2679
2679
|
/** Current app name */
|