/wdd - Versão final a funcionar com mysql :)
This commit is contained in:
parent
028afde436
commit
ab48ac6220
@ -3,6 +3,7 @@ const { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, Messag
|
||||
|
||||
|
||||
|
||||
|
||||
console.error("--------------------- teste.js ---------------------");
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
const { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, MessageFlags } = require('discord.js');
|
||||
const conn = require('../../../database/db'); // Ajusta o caminho
|
||||
|
||||
|
||||
module.exports = {
|
||||
name: 'interactionCreate',
|
||||
async execute(interaction, client) {
|
||||
@ -14,7 +15,7 @@ module.exports = {
|
||||
const [rows] = await conn.execute(
|
||||
'SELECT name,value FROM choices LIMIT 25',
|
||||
[`%${focusedValue}%`]
|
||||
);
|
||||
);
|
||||
|
||||
const suggestions = rows.map(row => ({
|
||||
name: row.name,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user