vimcord 1.0.53 → 1.0.55
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 +7 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- 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 +2 -2
package/dist/index.cjs
CHANGED
|
@@ -780,6 +780,8 @@ var EventBuilder = class _EventBuilder {
|
|
|
780
780
|
return results.every(Boolean);
|
|
781
781
|
}
|
|
782
782
|
async executeEvent(...args) {
|
|
783
|
+
let canceled = false;
|
|
784
|
+
const cancel = () => canceled = true;
|
|
783
785
|
try {
|
|
784
786
|
if (!this.enabled) {
|
|
785
787
|
return;
|
|
@@ -795,7 +797,8 @@ var EventBuilder = class _EventBuilder {
|
|
|
795
797
|
return;
|
|
796
798
|
}
|
|
797
799
|
if (this.beforeExecute) {
|
|
798
|
-
await this.beforeExecute(...args);
|
|
800
|
+
await this.beforeExecute({ cancel }, ...args);
|
|
801
|
+
if (canceled) return;
|
|
799
802
|
}
|
|
800
803
|
const result = await this.execute?.(...args);
|
|
801
804
|
if (this.afterExecute) {
|
|
@@ -1787,7 +1790,7 @@ var VimcordErrorHandler = class {
|
|
|
1787
1790
|
var import_chalk2 = __toESM(require("chalk"));
|
|
1788
1791
|
|
|
1789
1792
|
// package.json
|
|
1790
|
-
var version = "1.0.
|
|
1793
|
+
var version = "1.0.55";
|
|
1791
1794
|
|
|
1792
1795
|
// src/client/vimcord.logger.ts
|
|
1793
1796
|
var clientLoggerFactory = (client) => new Logger({ prefixEmoji: "\u26A1", prefix: `vimcord (i${client.clientId})` }).extend({
|
|
@@ -3649,7 +3652,8 @@ var BetterModal = class _BetterModal {
|
|
|
3649
3652
|
addTextInput(data) {
|
|
3650
3653
|
this.validateComponentLength();
|
|
3651
3654
|
const customId = data.customId ?? this.createComponentId();
|
|
3652
|
-
const
|
|
3655
|
+
const { label: _, ...textInputData } = data;
|
|
3656
|
+
const textInput = new import_discord13.TextInputBuilder({ style: import_discord13.TextInputStyle.Short, required: false, ...textInputData, customId });
|
|
3653
3657
|
const label = this.createLabelComponent(data);
|
|
3654
3658
|
label.setTextInputComponent(textInput);
|
|
3655
3659
|
this.components.set(customId, { textInput: data });
|