diff --git a/commands/setup.js b/commands/setup.js index 61988c4..2f4db60 100644 --- a/commands/setup.js +++ b/commands/setup.js @@ -30,8 +30,8 @@ const execute = async (interaction) => { const name = interaction.guild.name; const shortDescription = "Our super cool product hub!"; const longDescription = "Welcome to our super cool product hub! We offer a variety of awesome products for you to explore and purchase. Enjoy your stay!"; - const [result] = await pool.query('INSERT INTO hubs (ownerId, discordGuild, name, shortDescription, longDescription, secretKey) VALUES (?, ?, ?, ?, ?, ?)', [ownerId, guildId, name, shortDescription, longDescription, crypto.randomBytes(64).toString('hex')]); - + const result = await pool.query('INSERT INTO hubs (ownerId, discordGuild, name, shortDescription, longDescription, secretKey) VALUES (?, ?, ?, ?, ?, ?)', [ownerId, guildId, name, shortDescription, longDescription, await crypto.randomBytes(64).toString('hex')]); + console.log(result) if (result.affectedRows === 1) { return interaction.reply({ content: `Hub successfully created with ID: \`${result.insertId}\`. Get details via the /settings command!`, ephemeral: true }); } else {