aboutsummaryrefslogtreecommitdiff
path: root/src/lib/common/ConfirmationPrompt.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-23 18:13:05 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-23 18:13:05 -0500
commita3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a (patch)
tree9b0f8ed8a93c22c90512751e3f2f5937e1925760 /src/lib/common/ConfirmationPrompt.ts
parent5557677f1570eb564a30cfcebb6030235dc84d47 (diff)
downloadtanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.tar.gz
tanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.tar.bz2
tanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.zip
fix discord.js breaking changes, some other stuff
Diffstat (limited to 'src/lib/common/ConfirmationPrompt.ts')
-rw-r--r--src/lib/common/ConfirmationPrompt.ts27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/lib/common/ConfirmationPrompt.ts b/src/lib/common/ConfirmationPrompt.ts
index a4acf83..97f18b3 100644
--- a/src/lib/common/ConfirmationPrompt.ts
+++ b/src/lib/common/ConfirmationPrompt.ts
@@ -1,6 +1,5 @@
import { type BushMessage, type BushSlashMessage } from '#lib';
-import { MessageActionRow, MessageButton, type MessageComponentInteraction, type MessageOptions } from 'discord.js';
-import { MessageButtonStyles } from 'discord.js/typings/enums';
+import { ActionRow, ButtonComponent, ButtonStyle, type MessageComponentInteraction, type MessageOptions } from 'discord.js';
/**
* Sends a message with buttons for the user to confirm or cancel the action.
@@ -30,19 +29,17 @@ export class ConfirmationPrompt {
*/
protected async send(): Promise<boolean> {
this.messageOptions.components = [
- new MessageActionRow().addComponents(
- new MessageButton({
- style: MessageButtonStyles.SUCCESS,
- customId: 'confirmationPrompt_confirm',
- emoji: util.emojis.successFull,
- label: 'Yes'
- }),
- new MessageButton({
- style: MessageButtonStyles.DANGER,
- customId: 'confirmationPrompt_deny',
- emoji: util.emojis.errorFull,
- label: 'No'
- })
+ new ActionRow().addComponents(
+ new ButtonComponent()
+ .setStyle(ButtonStyle.Primary)
+ .setCustomId('confirmationPrompt_confirm')
+ .setEmoji({ id: util.emojis.successFull, name: 'successFull', animated: false })
+ .setLabel('Yes'),
+ new ButtonComponent()
+ .setStyle(ButtonStyle.Danger)
+ .setCustomId('confirmationPrompt_cancel')
+ .setEmoji({ id: util.emojis.errorFull, name: 'errorFull', animated: false })
+ .setLabel('No')
)
];