Add some logging
This commit is contained in:
parent
c419695c53
commit
60bdaa17c1
|
|
@ -15,7 +15,7 @@ const execute = async (interaction) => {
|
||||||
if (!hub) return interaction.reply({ content: "Hub not found for this guild", ephemeral: true });
|
if (!hub) return interaction.reply({ content: "Hub not found for this guild", ephemeral: true });
|
||||||
|
|
||||||
const productName = interaction.options.getString("name");
|
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]);
|
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 });
|
if (!product) return interaction.reply({ content: "Product not found", ephemeral: true });
|
||||||
// Proceed with creation
|
// Proceed with creation
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue