From 582d8ec90985d6f257f30ebd65ed3bdda1fea7be Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Wed, 23 Feb 2022 20:13:05 -0500 Subject: fix(ConfirmationPrompt): make it actually work --- src/lib/common/ConfirmationPrompt.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/common/ConfirmationPrompt.ts') 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((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); } } }); -- cgit