diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-23 20:13:05 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-23 20:13:05 -0500 |
commit | 582d8ec90985d6f257f30ebd65ed3bdda1fea7be (patch) | |
tree | c2f3a715efae9eb0f2cf92994ca162c7cd501a31 /src | |
parent | 47aede9d2ad73c3a386ff64c715193ccd46016b2 (diff) | |
download | tanzanite-582d8ec90985d6f257f30ebd65ed3bdda1fea7be.tar.gz tanzanite-582d8ec90985d6f257f30ebd65ed3bdda1fea7be.tar.bz2 tanzanite-582d8ec90985d6f257f30ebd65ed3bdda1fea7be.zip |
fix(ConfirmationPrompt): make it actually work
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/common/ConfirmationPrompt.ts | 8 |
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); } } }); |