This commit is contained in:
Bxio 2025-04-05 11:25:32 +01:00
parent d718ecb424
commit 267bc6d451

View File

@ -20,13 +20,13 @@ module.exports = {
if (interaction.commandName === 'wdd') { if (interaction.commandName === 'wdd') {
try { try {
const [rows] = await conn.execute( const [rows] = await conn.execute(
'SELECT nome FROM Choices WHERE nome LIKE ? LIMIT 25', 'SELECT nome FROM choices WHERE name,value LIKE ? LIMIT 25',
[`%${focusedValue}%`] [`%${focusedValue}%`]
); );
const suggestions = rows.map(row => ({ const suggestions = rows.map(row => ({
name: row.nome, name: row.name,
value: row.nome, value: row.value,
})); }));
await interaction.respond(suggestions); await interaction.respond(suggestions);