const { handleTicketButton } = require('../systems/tickets'); const { handleDropButton, handleDownloadButton } = require('../systems/drops'); const { handleMassDropInteraction } = require('../systems/massdrop'); module.exports = { name: 'interactionCreate', async execute(client, interaction) { // Handle select menus and modals as well if (!interaction.isButton() && !interaction.isStringSelectMenu() && !interaction.isModalSubmit()) return; // Handle download buttons from server channels (dl_) if (interaction.isButton() && interaction.customId.startsWith('dl_')) { await handleDownloadButton(interaction); return; } // Try mass drop interactions (buttons, dropdowns, modals) const massDropHandled = await handleMassDropInteraction(interaction); if (massDropHandled) return; // Try drop buttons first (DM interactions) if (interaction.isButton()) { const dropHandled = await handleDropButton(interaction); if (dropHandled) return; // Then ticket buttons (server interactions) await handleTicketButton(interaction, client); } }, };