More commands fixed and purge to here
diff --git a/src/utils/confirmationMessage.ts b/src/utils/confirmationMessage.ts
index 87724f3..6682be0 100644
--- a/src/utils/confirmationMessage.ts
+++ b/src/utils/confirmationMessage.ts
@@ -18,6 +18,7 @@
title: string;
disabled: boolean;
value: string | null;
+ notValue: string | null;
emoji: string | undefined;
active: boolean;
onClick: () => Promise<T>;
@@ -68,6 +69,7 @@
disabled: boolean,
callback: (() => Promise<unknown>) | null = async () => null,
callbackClicked: string | null,
+ callbackNotClicked: string | null,
emoji?: string,
initial?: boolean
) {
@@ -75,6 +77,7 @@
title: title,
disabled: disabled,
value: callbackClicked,
+ notValue: callbackNotClicked,
emoji: emoji,
active: initial ?? false,
onClick: callback ?? (async () => null),
@@ -145,10 +148,12 @@
"\n\n" +
Object.values(this.customButtons)
.map((v) => {
- if (v.value === null) return "";
- return v.active ? `*${v.value}*\n` : "";
- })
- .join("")
+ if (v.active) {
+ return v.value ? `*${v.value}*\n` : "";
+ } else {
+ return v.notValue ? `*${v.notValue}*\n` : "";
+ }
+ }).join("")
)
.setStatus(this.color)
],
@@ -163,7 +168,8 @@
} else {
m = (await this.interaction.reply(object)) as unknown as Message;
}
- } catch {
+ } catch (e) {
+ console.log(e);
cancelled = true;
continue;
}