From 696e4448464c469bea3a915839907b0da76b2a41 Mon Sep 17 00:00:00 2001 From: shni Date: Sun, 5 Oct 2025 01:35:55 -0500 Subject: [PATCH] refactor(economy): improve labels for stackable and max inventory fields in item editor --- src/commands/messages/game/itemCreate.ts | 2 +- src/commands/messages/game/itemEdit.ts | 2 +- src/commands/messages/game/mobCreate.ts | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/commands/messages/game/itemCreate.ts b/src/commands/messages/game/itemCreate.ts index 0377934..be596d3 100644 --- a/src/commands/messages/game/itemCreate.ts +++ b/src/commands/messages/game/itemCreate.ts @@ -139,7 +139,7 @@ async function showBaseModal(i: ButtonInteraction, state: ItemEditorState) { { type: ComponentType.Label, label: 'Descripción', component: { type: ComponentType.TextInput, customId: 'desc', style: TextInputStyle.Paragraph, required: false, value: state.description ?? '' } }, { type: ComponentType.Label, label: 'Categoría', component: { type: ComponentType.TextInput, customId: 'cat', style: TextInputStyle.Short, required: false, value: state.category ?? '' } }, { type: ComponentType.Label, label: 'Icon URL', component: { type: ComponentType.TextInput, customId: 'icon', style: TextInputStyle.Short, required: false, value: state.icon ?? '' } }, - { type: ComponentType.Label, label: 'Stackable,true/false; MaxPerInv (número o vacío)', component: { type: ComponentType.TextInput, customId: 'stack_max', style: TextInputStyle.Short, required: false, placeholder: 'true,10', value: state.stackable !== undefined ? `${state.stackable},${state.maxPerInventory ?? ''}` : '' } }, + { type: ComponentType.Label, label: 'Stackable y Máx inventario', component: { type: ComponentType.TextInput, customId: 'stack_max', style: TextInputStyle.Short, required: false, placeholder: 'true,10', value: state.stackable !== undefined ? `${state.stackable},${state.maxPerInventory ?? ''}` : '' } }, ], } as const; diff --git a/src/commands/messages/game/itemEdit.ts b/src/commands/messages/game/itemEdit.ts index 3269341..177951b 100644 --- a/src/commands/messages/game/itemEdit.ts +++ b/src/commands/messages/game/itemEdit.ts @@ -104,7 +104,7 @@ async function showBaseModal(i: ButtonInteraction, state: ItemEditorState) { { type: ComponentType.Label, label: 'Descripción', component: { type: ComponentType.TextInput, customId: 'desc', style: TextInputStyle.Paragraph, required: false, value: state.description ?? '' } }, { type: ComponentType.Label, label: 'Categoría', component: { type: ComponentType.TextInput, customId: 'cat', style: TextInputStyle.Short, required: false, value: state.category ?? '' } }, { type: ComponentType.Label, label: 'Icon URL', component: { type: ComponentType.TextInput, customId: 'icon', style: TextInputStyle.Short, required: false, value: state.icon ?? '' } }, - { type: ComponentType.Label, label: 'Stackable,true/false; MaxPerInv (número o vacío)', component: { type: ComponentType.TextInput, customId: 'stack_max', style: TextInputStyle.Short, required: false, placeholder: 'true,10', value: state.stackable !== undefined ? `${state.stackable},${state.maxPerInventory ?? ''}` : '' } }, + { type: ComponentType.Label, label: 'Stackable y Máx inventario', component: { type: ComponentType.TextInput, customId: 'stack_max', style: TextInputStyle.Short, required: false, placeholder: 'true,10', value: state.stackable !== undefined ? `${state.stackable},${state.maxPerInventory ?? ''}` : '' } }, ], } as const; await i.showModal(modal); try { diff --git a/src/commands/messages/game/mobCreate.ts b/src/commands/messages/game/mobCreate.ts index eb62076..aa79526 100644 --- a/src/commands/messages/game/mobCreate.ts +++ b/src/commands/messages/game/mobCreate.ts @@ -35,7 +35,6 @@ export const command: CommandMessage = { const editorMsg = await message.channel.send({ content: `👾 Editor de Mob: \`${key}\``, - flags: MessageFlags.IsComponentsV2, components: [ { type: 1, components: [ { type: 2, style: ButtonStyle.Primary, label: 'Base', custom_id: 'mb_base' }, { type: 2, style: ButtonStyle.Secondary, label: 'Stats (JSON)', custom_id: 'mb_stats' }, @@ -93,4 +92,3 @@ async function showJsonModal(i: ButtonInteraction, state: MobEditorState, field: } else { state[field] = field==='stats' ? { attack: 5 } : {}; await sub.reply({ content: 'ℹ️ Limpio.', flags: MessageFlags.Ephemeral }); } } catch {} } -