This commit is contained in:
parent
3012089769
commit
866d69e199
@ -48,9 +48,12 @@ module.exports = {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
const [rows] = await conn.execute('SELECT discord_id, discord_username, cargo FROM users'); // Altere para a sua consulta
|
||||||
|
|
||||||
const table = new Table({
|
const table = new Table({
|
||||||
titles: ['Level', 'Money', 'Wins'],
|
titles: ['discord_id', 'discord_username', 'cargo'],
|
||||||
titleIndexes: [0, 8, 16],
|
titleIndexes: [0, 8, 16],
|
||||||
columnIndexes: [0, 6, 14],
|
columnIndexes: [0, 6, 14],
|
||||||
start: '`',
|
start: '`',
|
||||||
@ -58,6 +61,10 @@ module.exports = {
|
|||||||
padEnd: 3
|
padEnd: 3
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
rows.forEach(row => {
|
||||||
|
table.addRow([row.discord_id, row.discord_username, row.cargo]);
|
||||||
|
});
|
||||||
table.addRow(['1', '$120', '2'], { override: 4 });
|
table.addRow(['1', '$120', '2'], { override: 4 });
|
||||||
table.addRow(['72', '$10', '25'], { override: 3 });
|
table.addRow(['72', '$10', '25'], { override: 3 });
|
||||||
table.addRow(['614', '$1220', '12']);
|
table.addRow(['614', '$1220', '12']);
|
||||||
@ -70,6 +77,13 @@ module.exports = {
|
|||||||
|
|
||||||
await interaction.editReply({ embeds: [embed] });
|
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