Skip to content

Commit 7b03ef6

Browse files
committed
feat: components v2 in /deploy-dev
1 parent fe9ab93 commit 7b03ef6

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

src/commands/deploy-dev.ts

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
import { ChatInputCommandBuilder, type ChatInputCommandInteraction, MessageFlags, Routes } from 'discord.js';
1+
import {
2+
ChatInputCommandBuilder,
3+
type ChatInputCommandInteraction,
4+
ComponentType,
5+
MessageFlags,
6+
Routes
7+
} from 'discord.js';
28
import type { Application } from '#classes';
39

410
export async function onChatInputCommand(client: Application<true>, interaction: ChatInputCommandInteraction) {
@@ -19,16 +25,21 @@ export async function onChatInputCommand(client: Application<true>, interaction:
1925
content: `${create ? 'Deployed' : 'Deleted'} dev commands in \`${guildId}\``,
2026
flags: MessageFlags.Ephemeral
2127
});
22-
} catch (error: unknown) {
28+
} catch (error) {
2329
return interaction.reply({
24-
embeds: [
30+
flags: MessageFlags.Ephemeral | MessageFlags.IsComponentsV2,
31+
components: [
2532
{
26-
title: 'lol you messed up',
27-
description: `\`\`\`js\n${error}\`\`\``,
28-
color: client.color
33+
type: ComponentType.Container,
34+
accentColor: client.color,
35+
components: [
36+
{
37+
type: ComponentType.TextDisplay,
38+
content: `## Error Deploying\n\`\`\`js\n${error}\`\`\``
39+
}
40+
]
2941
}
30-
],
31-
flags: MessageFlags.Ephemeral
42+
]
3243
});
3344
}
3445
}

0 commit comments

Comments
 (0)