This commit is contained in:
parent
0b68a92a05
commit
90ef8ab22e
@ -70,6 +70,28 @@ module.exports = {
|
||||
|
||||
|
||||
|
||||
try {
|
||||
const [rows] = await conn.execute('SELECT u.id, u.discord_id, u.discord_username, u.nig, c.name AS nomedocargo FROM users u JOIN choices c ON u.cargo = c.value ORDER BY u.id ASC');
|
||||
const embed = new EmbedBuilder().setColor("#00b0f4");
|
||||
|
||||
// Adiciona cada usuário como um field no embed
|
||||
rows.forEach(row => {
|
||||
|
||||
embed.addFields({
|
||||
name: ``, // ou algum outro título
|
||||
value: `> **${row.nig}** \n > <@${row.discord_id}> \n metas: \n * carvao: \`1000\`\n * enxofre: \`1000\`\nCargo: ${row.nomedocargo} `,
|
||||
inline: true
|
||||
});
|
||||
});
|
||||
|
||||
await interaction.editReply({ embeds: [embed] });
|
||||
|
||||
} catch (error) {
|
||||
console.error('DEV:', error);
|
||||
await interaction.editReply({ content: 'dev erro!' });
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user