From 7808c815fe67d627e7ba9b88a73557eb60e43708 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Mon, 15 Sep 2025 11:06:10 -0600 Subject: [PATCH] Fix that --- commands/import.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/import.js b/commands/import.js index 227ab00..fe681ef 100644 --- a/commands/import.js +++ b/commands/import.js @@ -38,10 +38,10 @@ const execute = async (interaction) => { const [existingProduct] = await pool.query('SELECT * FROM products WHERE devProductId = ? AND hubId = ?', [prod.devproduct_id, hub.id]); if (!existingProduct) continue; // No matching product, skip // Product exists, check if theres already a purchase record - const [existingPurchase] = await pool.query('SELECT * FROM purchases WHERE userId = ? AND productId = ?', [user.id, existingProduct.id]); + const [existingPurchase] = await pool.query('SELECT * FROM purchases WHERE robloxId = ? AND productId = ?', [user.robloxId, existingProduct.id]); if (existingPurchase) continue; // Already have a purchase record, skip // Create purchase record - await pool.query('INSERT INTO purchases (userId, productId, hubId) VALUES (?, ?, ?)', [user.id, existingProduct.id, hub.id]); + await pool.query('INSERT INTO purchases (robloxId, productId, hubId) VALUES (?, ?, ?)', [user.robloxId, existingProduct.id, hub.id]); console.log(`Imported purchase of product ${prod.name} > ${existingProduct.name} for user ${user.robloxId}`); count++; }