diff --git a/src/commands/Community/lista_membros.js b/src/commands/Community/lista_membros.js index 13efe8b..cddd295 100644 --- a/src/commands/Community/lista_membros.js +++ b/src/commands/Community/lista_membros.js @@ -1,4 +1,5 @@ // comandos/add.js +import { Table } from 'embed-table'; const { InteractionContextType, EmbedBuilder, PermissionFlagsBits, SlashCommandBuilder, MessageFlags } = require('discord.js'); const conn = require('../../../database/db'); // Ajusta o caminho @@ -49,14 +50,32 @@ module.exports = { + const table = new Table({ + titles: ['Level', 'Money', 'Wins'], + titleIndexes: [0, 8, 16], + columnIndexes: [0, 6, 14], + start: '`', + end: '`', + padEnd: 3 + }); + + table.addRow(['1', '$120', '2'], { override: 4 }); + table.addRow(['72', '$10', '25'], { override: 0 }); + table.addRow(['614', '$1220', '12']); + + // 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(`\n${string}\n`); - }, }; \ No newline at end of file