feat: enable Display Components V2 and add back navigation button

This commit is contained in:
2025-09-21 00:16:04 -05:00
parent 136baedfc9
commit dead584bec
3 changed files with 15 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "amayo",
"version": "0.10.200",
"version": "0.10.210",
"description": "",
"main": "src/main.ts",
"scripts": {

View File

@@ -116,7 +116,8 @@ export const command: CommandMessage = {
};
const demoMessage = await message.reply({
flags: 4096, // SuppressEmbeds
// Activar Display Components V2 y mantener SuppressEmbeds
flags: (32768 | 4096),
components: [mainPanel, actionRow]
});

View File

@@ -295,7 +295,17 @@ export const command: CommandMessage = {
await interaction.update({
// @ts-ignore
components: [blockSelectPanel, blockSelectRow, backRow]
components: [blockSelectPanel, blockSelectRow, {
type: 1,
components: [
{
type: 2,
style: ButtonStyle.Secondary,
label: "↩️ Volver al Inicio",
custom_id: "back_to_main"
}
]
}]
});
}
break;
@@ -528,8 +538,7 @@ export const command: CommandMessage = {
case "refresh_status":
// Recargar datos y volver al panel principal
const refreshedChannels = await client.prisma.allianceChannel.findMany({
where: { guildId: message.guildId! },
include: { blockConfig: true }
where: { guildId: message.guildId! }
});
const refreshedBlocks = await client.prisma.blockV2Config.findMany({