From 118def435edea4d877707aa9d48d42cc55bde2e5 Mon Sep 17 00:00:00 2001 From: Bxio Date: Fri, 2 May 2025 00:46:11 +0100 Subject: [PATCH] --- src/commands/Community/meta.js | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/commands/Community/meta.js b/src/commands/Community/meta.js index 1164a83..cbf0e85 100644 --- a/src/commands/Community/meta.js +++ b/src/commands/Community/meta.js @@ -102,4 +102,26 @@ module.exports = { // Espera pelo clique no botão const filter = (i) => i.customId === 'mostrarDropdown' && i.user.id === interaction.user.id; - const collector = interaction.channel.createMessageComponentCollector({ filter, time: 15000 + const collector = interaction.channel.createMessageComponentCollector({ filter, time: 15000 }); + + collector.on('collect', async (i) => { + if (i.customId === 'mostrarDropdown') { + await i.update({ + content: '🛠️ Agora escolhe o recurso:', + components: [rowSelect], + }); + } + }); + + collector.on('end', (collected) => { + if (collected.size === 0) { + interaction.editReply({ content: '❌ O tempo para escolher o recurso expirou.' }); + } + }); + + } catch (error) { + console.error('Erro ao buscar usuários:', error); + await interaction.editReply({ content: '❌ Erro ao carregar informações dos usuários.' }); + } + }, +};