diff --git a/src/commands/Community/lista_membros.js b/src/commands/Community/lista_membros.js index a5f65b0..5c36e82 100644 --- a/src/commands/Community/lista_membros.js +++ b/src/commands/Community/lista_membros.js @@ -1,7 +1,7 @@ // comandos/add.js const { InteractionContextType, EmbedBuilder, PermissionFlagsBits, SlashCommandBuilder, MessageFlags } = require('discord.js'); const conn = require('../../../database/db'); // Ajusta o caminho -const { Table } = require('embed-table'); +//const { Table } = require('embed-table'); console.error("--------------------- lista_membro.js ---------------------"); @@ -52,31 +52,26 @@ module.exports = { const [rows] = await conn.execute('SELECT discord_id, discord_username, cargo FROM users'); // Altere para a sua consulta - const table = new Table({ - titles: ['Level', 'Money', 'Wins', 'Wins'], - titleIndexes: [0, 18, 33, 40], - columnIndexes: [0, 18, 33, 40], - start: '`', - end: '`', - padEnd: 3 - }); + const embed = new EmbedBuilder() + .addFields( + rows.forEach(row => { + { + name: "", + value: "<@row.discord_id> asdsadadasddasasda```sddasasdasddasasdasddasasdasddasasdasddasasd```", + inline: true + }, + }); + ) + .setColor("#00b0f4") + .setTimestamp(); + + await interaction.editReply({ embeds: [embed] }); // rows.forEach(row => { // table.addRow(['row.discord_id', 'row.discord_username', 'row.cargo']); //}); - table.addRow(['123456789101112', '2', '3', '3']); - table.addRow(['123456789101112', '2', '3', '3']); - table.addRow(['123456789101112', '2', '3', '3']); - - // 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] }); } catch (error) { console.error('DEV:', error);