vimcord 1.0.55 → 1.0.57
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 +8 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +12 -4
- package/dist/index.d.ts +12 -4
- package/dist/index.js +8 -3
- 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.cjs
CHANGED
|
@@ -316,6 +316,8 @@ 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 canceled = false;
|
|
320
|
+
const cancel = () => canceled = true;
|
|
319
321
|
try {
|
|
320
322
|
if (!config.enabled) {
|
|
321
323
|
return await config.onUsedWhenDisabled?.(...args);
|
|
@@ -330,7 +332,10 @@ var BaseCommandBuilder = class {
|
|
|
330
332
|
if (!await this.checkConditions(config, ...args)) {
|
|
331
333
|
return await config.onConditionsNotMet?.(...args);
|
|
332
334
|
}
|
|
333
|
-
|
|
335
|
+
if (config.beforeExecute) {
|
|
336
|
+
await config.beforeExecute?.({ cancel }, ...args);
|
|
337
|
+
if (canceled) return;
|
|
338
|
+
}
|
|
334
339
|
if (config.logExecution !== false) {
|
|
335
340
|
const cmdName = this.options.name || this.builder?.name || "Unknown";
|
|
336
341
|
const location = ctx.guild ? `${ctx.guild.name} (${ctx.guild.id})` : "Direct Messages";
|
|
@@ -1790,7 +1795,7 @@ var VimcordErrorHandler = class {
|
|
|
1790
1795
|
var import_chalk2 = __toESM(require("chalk"));
|
|
1791
1796
|
|
|
1792
1797
|
// package.json
|
|
1793
|
-
var version = "1.0.
|
|
1798
|
+
var version = "1.0.57";
|
|
1794
1799
|
|
|
1795
1800
|
// src/client/vimcord.logger.ts
|
|
1796
1801
|
var clientLoggerFactory = (client) => new Logger({ prefixEmoji: "\u26A1", prefix: `vimcord (i${client.clientId})` }).extend({
|
|
@@ -3305,7 +3310,7 @@ var BetterCollector = class _BetterCollector {
|
|
|
3305
3310
|
if (!this.message) return;
|
|
3306
3311
|
if (this.collector) return;
|
|
3307
3312
|
this.collector = this.message.createMessageComponentCollector({
|
|
3308
|
-
idle: this.options?.idle ?? this.config.timeouts.collectorIdle,
|
|
3313
|
+
idle: this.options?.timeout ? void 0 : this.options?.idle ?? this.config.timeouts.collectorIdle,
|
|
3309
3314
|
time: this.options?.timeout ?? this.config.timeouts.collectorTimeout,
|
|
3310
3315
|
componentType: this.options?.type,
|
|
3311
3316
|
max: this.options?.max,
|