aboutsummaryrefslogtreecommitdiff
path: root/src/lib/common/ConfirmationPrompt.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-02-23 20:13:05 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-02-23 20:13:05 -0500
commit582d8ec90985d6f257f30ebd65ed3bdda1fea7be (patch)
treec2f3a715efae9eb0f2cf92994ca162c7cd501a31 /src/lib/common/ConfirmationPrompt.ts
parent47aede9d2ad73c3a386ff64c715193ccd46016b2 (diff)
downloadtanzanite-582d8ec90985d6f257f30ebd65ed3bdda1fea7be.tar.gz
tanzanite-582d8ec90985d6f257f30ebd65ed3bdda1fea7be.tar.bz2
tanzanite-582d8ec90985d6f257f30ebd65ed3bdda1fea7be.zip
fix(ConfirmationPrompt): make it actually work
Diffstat (limited to 'src/lib/common/ConfirmationPrompt.ts')
-rw-r--r--src/lib/common/ConfirmationPrompt.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/common/ConfirmationPrompt.ts b/src/lib/common/ConfirmationPrompt.ts
index 2dc943a..b775640 100644
--- a/src/lib/common/ConfirmationPrompt.ts
+++ b/src/lib/common/ConfirmationPrompt.ts
@@ -35,7 +35,7 @@ export class ConfirmationPrompt {
)
];
- const msg = (await this.message.util.sendNew(this.messageOptions)) as BushMessage;
+ const msg = await this.message.channel!.send(this.messageOptions);
return await new Promise<boolean>((resolve) => {
let responded = false;
@@ -48,13 +48,13 @@ export class ConfirmationPrompt {
await interaction.deferUpdate().catch(() => undefined);
if (interaction.user.id == this.message.author.id || client.config.owners.includes(interaction.user.id)) {
if (interaction.customId === 'confirmationPrompt_confirm') {
- resolve(true);
responded = true;
collector.stop();
- } else if (interaction.customId === 'confirmationPrompt_deny') {
- resolve(false);
+ resolve(true);
+ } else if (interaction.customId === 'confirmationPrompt_cancel') {
responded = true;
collector.stop();
+ resolve(false);
}
}
});