Add some logging

This commit is contained in:
Christopher Cookman 2026-08-11 23:01:41 -06:00
parent 6e878d1f6a
commit c419695c53

View file

@ -15,7 +15,7 @@ const execute = async (interaction) => {
if (!hub) return interaction.reply({ content: "Hub not found for this guild", ephemeral: true });
const productName = interaction.options.getString("name");
console.log(`Hub is ${hub}`)
console.log(`Hub is ${JSON.stringify(hub)}, productName is ${productName}`);
const [product] = await pool.query('SELECT * FROM products WHERE UPPER(name) LIKE ? AND hubId = ?', [`%${productName.toUpperCase()}%`, hub.id]);
if (!product) return interaction.reply({ content: "Product not found", ephemeral: true });
// Proceed with creation