vimcord 1.0.49 → 1.0.50

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 CHANGED
@@ -316,6 +316,7 @@ var BaseCommandBuilder = class {
316
316
  async run(client, ...args) {
317
317
  const config = this.resolveConfig(client);
318
318
  const ctx = this.extractContext(args);
319
+ let cancel = false;
319
320
  try {
320
321
  if (!config.enabled) {
321
322
  return await config.onUsedWhenDisabled?.(...args);
@@ -330,7 +331,8 @@ var BaseCommandBuilder = class {
330
331
  if (!await this.checkConditions(config, ...args)) {
331
332
  return await config.onConditionsNotMet?.(...args);
332
333
  }
333
- await config.beforeExecute?.(...args);
334
+ await config.beforeExecute?.({ cancel: () => cancel = true }, ...args);
335
+ if (cancel) return;
334
336
  if (config.logExecution !== false) {
335
337
  const cmdName = this.options.name || this.builder?.name || "Unknown";
336
338
  const location = ctx.guild ? `${ctx.guild.name} (${ctx.guild.id})` : "Direct Messages";
@@ -1787,7 +1789,7 @@ var VimcordErrorHandler = class {
1787
1789
  var import_chalk2 = __toESM(require("chalk"));
1788
1790
 
1789
1791
  // package.json
1790
- var version = "1.0.48";
1792
+ var version = "1.0.50";
1791
1793
 
1792
1794
  // src/client/vimcord.logger.ts
1793
1795
  var clientLoggerFactory = (client) => new Logger({ prefixEmoji: "\u26A1", prefix: `vimcord (i${client.clientId})` }).extend({