From 5b4079f578c198c7b02441dd1072b24bf1dea308 Mon Sep 17 00:00:00 2001 From: Bxio Date: Tue, 29 Apr 2025 15:59:15 +0100 Subject: [PATCH] --- src/commands/Community/lista_membros.js | 35 +++++++++++-------------- 1 file changed, 15 insertions(+), 20 deletions(-) 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);