This commit is contained in:
parent
bc861f8e4f
commit
118def435e
@ -102,4 +102,26 @@ module.exports = {
|
|||||||
|
|
||||||
// Espera pelo clique no botão
|
// Espera pelo clique no botão
|
||||||
const filter = (i) => i.customId === 'mostrarDropdown' && i.user.id === interaction.user.id;
|
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.' });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user