From 0018c5d505e3806f0a02358ff5fcb1d16d5f71a3 Mon Sep 17 00:00:00 2001 From: Bxio Date: Tue, 29 Apr 2025 14:58:56 +0100 Subject: [PATCH] --- src/commands/Community/lista_membros.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/commands/Community/lista_membros.js b/src/commands/Community/lista_membros.js index 6cede68..f449ead 100644 --- a/src/commands/Community/lista_membros.js +++ b/src/commands/Community/lista_membros.js @@ -51,18 +51,22 @@ module.exports = { const table = new Table({ titles: ['Level', 'Money', 'Wins'], - titleIndexes: [0, 10, 20], // larguras de coluna mais generosas - rowIndexes: [0, 10, 20], + titleIndexes: [0, 8, 16], + columnIndexes: [0, 6, 14], start: '`', end: '`', - padEnd: 2, // suficiente para espaçar sem quebrar formatação + padEnd: 3 }); - table.addRow(['1', '$120', '2']); - table.addRow(['72', '$10', '25']); + table.addRow(['1', '$120', '2'], { override: 4 }); + table.addRow(['72', '$10', '25'], { override: 0 }); table.addRow(['614', '$1220', '12']); - const embed = new MessageEmbed().addFields(table.field()); + // Use this 'embed' when sending a message to a channel. + const embed = new EmbedBuilder().setFields(table.toField()); + + // Use this 'tableString' in a plain text area, (embed description or a regular message) + const string = table.toString(); await interaction.editReply({ embeds: [embed] });