diff --git a/src/commands/user/profile.ts b/src/commands/user/profile.ts index 271d62c..a2c034e 100644 --- a/src/commands/user/profile.ts +++ b/src/commands/user/profile.ts @@ -30,7 +30,7 @@ export const profile = createCommand({ const attachment = new AttachmentBuilder(cardBuffer, { name: 'student-id.png' }); - await interaction.editReply({ files: [attachment] }); // Send mostly just the image as requested, or maybe both? User said "show that user's student id". Image is primary. + await interaction.editReply({ files: [attachment] }); } }); diff --git a/src/index.ts b/src/index.ts index 66b8142..ca0abb4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -31,10 +31,7 @@ KyokoClient.on(Events.MessageCreate, async message => { KyokoClient.on(Events.InteractionCreate, async interaction => { // Handle Trade Interactions if (interaction.isButton() || interaction.isStringSelectMenu() || interaction.isModalSubmit()) { - if (interaction.customId.startsWith("trade_") || interaction.customId === "amount") { // "amount" is the text input id, usually interaction wrapper keeps customId of modal? - // Wait, ModalSubmitInteraction customId IS likely 'trade_money_modal'. - // The components INSIDE have IDs. The Interaction has the Modal ID. - // So checking startWith("trade_") is correct for the modal itself. + if (interaction.customId.startsWith("trade_") || interaction.customId === "amount") { await import("@/modules/trade/trade.interaction").then(m => m.handleTradeInteraction(interaction)); return; } diff --git a/src/modules/inventory/inventory.service.ts b/src/modules/inventory/inventory.service.ts index 2dffe96..c8dd866 100644 --- a/src/modules/inventory/inventory.service.ts +++ b/src/modules/inventory/inventory.service.ts @@ -120,13 +120,6 @@ export const inventoryService = { // Deduct Balance using economy service (passing tx ensures atomicity) await economyService.modifyUserBalance(userId, -totalPrice, 'PURCHASE', `Bought ${quantity}x ${item.name}`, txFn); - // Add Item (using local logic to keep in same tx, or could refactor addItem to take tx too and call it) - // Let's refactor addItem below to accept tx, then call it here? - // Since we are modifying buyItem, we can just inline the item addition or call addItem if we update it. - // Let's assume we update addItem next. For now, inline the add logic but cleaner. - - // Add Item using inner logic or self-call if we refactor properly. - // Calling addItem directly within the same transaction scope: await inventoryService.addItem(userId, itemId, quantity, txFn); return { success: true, item, totalPrice }; diff --git a/src/modules/system/scheduler.ts b/src/modules/system/scheduler.ts index 739a627..df1462c 100644 --- a/src/modules/system/scheduler.ts +++ b/src/modules/system/scheduler.ts @@ -39,8 +39,6 @@ export const schedulerService = { for (const timer of expiredAccess) { // TODO: Here we would call Discord API to remove roles/overwrites. - // e.g. discordClient.channels.cache.get(timer.metadata.channelId).permissionOverwrites.delete(timer.userId) - const meta = timer.metadata as any; console.log(`🚫 Revoking access for User ${timer.userId}: Key=${timer.key} (Channel: ${meta?.channelId || 'N/A'})`);