From 6901544af220e785e4421993535925ec93eb3535 Mon Sep 17 00:00:00 2001 From: shni Date: Sat, 27 Sep 2025 00:17:05 -0500 Subject: [PATCH] feat: update command admin panel with improved button interactions and memory usage display --- src/commands/messages/net/commandsAdmin.ts | 80 +++++++++++++++++----- 1 file changed, 62 insertions(+), 18 deletions(-) diff --git a/src/commands/messages/net/commandsAdmin.ts b/src/commands/messages/net/commandsAdmin.ts index d96a78c..a847bc9 100644 --- a/src/commands/messages/net/commandsAdmin.ts +++ b/src/commands/messages/net/commandsAdmin.ts @@ -17,13 +17,14 @@ function buildAdminPanel() { const now = new Date(); const ts = now.toISOString().replace('T', ' ').split('.')[0]; + // @ts-ignore return { type: 17, accent_color: 0x2b2d31, components: [ { type: 10, - content: '### πŸ› οΈ Panel de AdministraciΓ³n de Comandos\nGestiona el registro y limpieza de comandos **Slash**.' + content: '## <:Sup_bug:1420537401692131400> Panel de Administrativo\n -# Gestiona el registro y limpieza de comandos **Slash**.' }, { type: 14, divider: true, spacing: 1 }, { @@ -31,37 +32,80 @@ function buildAdminPanel() { content: 'Acciones disponibles:\nβ€’ Registrar comandos de GUILD (testing)\nβ€’ Registrar comandos GLOBAL (propagaciΓ³n lenta)\nβ€’ Limpiar comandos de GUILD\nβ€’ Limpiar comandos GLOBAL\n\nUsa los botones de abajo. Se evita ejecuciΓ³n simultΓ‘nea.' }, { - type: 1, + type: 9, components: [ - { type: 2, style: 1, label: 'Registrar GUILD', custom_id: 'cmd_reg_guild' }, - { type: 2, style: 1, label: 'Registrar GLOBAL', custom_id: 'cmd_reg_global' }, - { type: 2, style: 2, label: 'πŸ”„ Refrescar Memoria', custom_id: 'cmd_mem_refresh' } - ] + { type: 10, content: "Registrar los comandos '/' dentro del servidor de pruebas" } + ], + accessory: { + type: 2, + style: 1, + emoji: "1421364744412991520", + label: 'Registrar CMD en ServerTest', + custom_id: 'cmd_reg_guild' + } }, - // Fila 2 (acciones de limpieza) { - type: 1, + type: 9, components: [ - { type: 2, style: 4, label: 'Limpiar GUILD', custom_id: 'cmd_clear_guild' }, - { type: 2, style: 4, label: 'Limpiar GLOBAL', custom_id: 'cmd_clear_global' } - ] + { type: 10, content: "Registrar los comandos '/' de manera GLOBAL (todos los servidores)" } + ], + accessory: { + type: 2, + style: 1, + emoji: "1421364744412991520", + label: 'Registrar GLOBAL', + custom_id: 'cmd_reg_global' + } }, + { + type: 9, + components: [ + { type: 10, content: "Eliminar los comandos '/' dentro del servidor de pruebas" } + ], + accessory: { + type: 2, + style: 1, + emoji: "1420535096208920576", + label: 'Eliminar CMD en ServerTest', + custom_id: 'cmd_clear_guild' + } + }, + { + type: 9, + components: [ + { type: 10, content: "Eliminar los comandos '/' de manera GLOBAL (todos los servidores)" } + ], + accessory: { + type: 2, + style: 1, + emoji: "1420535096208920576", + label: 'Eliminar ALL', + custom_id: 'cmd_clear_global' + } + }, + { type: 14, divider: true, spacing: 1 }, { type: 10, - content: ` ## πŸ–₯️ Uso de Memoria + content: ` ## <:Sup_bug:1420537401692131400> Uso de Memoria \n -# Última actualizaciΓ³n: ${ts} UTC \`\`\` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Memory Type β”‚ Usage β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ -β”‚ RSS β”‚ ${rss.padEnd(12)}β”‚ -β”‚ Heap Used β”‚ ${heapUsed.padEnd(12)}β”‚ -β”‚ Heap Total β”‚ ${heapTotal.padEnd(12)}β”‚ -β”‚ External β”‚ ${ext.padEnd(12)}β”‚ +β”‚ RSS β”‚ ${rss.padEnd(12)} β”‚ +β”‚ Heap Used β”‚ ${heapUsed.padEnd(12)} β”‚ +β”‚ Heap Total β”‚ ${heapTotal.padEnd(12)} β”‚ +β”‚ External β”‚ ${ext.padEnd(12)} β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ -Última actualizaciΓ³n: ${ts} UTC\`\`\`` +\`\`\`` }, - { type: 14, divider: false, spacing: 1 }, + { + type: 1, + components: [ + { type: 2, style: 2, emoji: "1420539242643193896", label: 'Refrescar Memoria', custom_id: 'cmd_mem_refresh' } + ] + }, + { type: 14, divider: false, spacing: 1 } ] }; }