Add some logging

This commit is contained in:
Christopher Cookman 2026-08-11 23:03:07 -06:00
parent c419695c53
commit 60bdaa17c1

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 ${JSON.stringify(hub)}, productName is ${productName}`);
console.log(`Hub is ${JSON.stringify(hub, (key, value) => typeof value === 'bigint' ? value.toString() : value)}, 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