This commit is contained in:
parent
547fcaaf78
commit
bb33054edb
@ -48,7 +48,20 @@ module.exports = {
|
||||
});
|
||||
});
|
||||
|
||||
await interaction.editReply({ embeds: [embed] });
|
||||
// Agora enviamos o embed e o botão juntos na mesma mensagem
|
||||
const rowButton = new ActionRowBuilder().addComponents(
|
||||
new ButtonBuilder()
|
||||
.setCustomId('mostrarDropdown')
|
||||
.setLabel('Escolher Recurso')
|
||||
.setStyle(1) // PRIMARY (valor 1)
|
||||
);
|
||||
|
||||
await interaction.editReply({
|
||||
content: '🛠️ Clica no botão para escolher o recurso:',
|
||||
embeds: [embed],
|
||||
components: [rowButton], // Incluímos o botão na mensagem
|
||||
ephemeral: true,
|
||||
});
|
||||
|
||||
} catch (error) {
|
||||
console.error('Erro ao buscar usuários:', error);
|
||||
@ -87,18 +100,6 @@ module.exports = {
|
||||
.addOptions(options);
|
||||
|
||||
const rowSelect = new ActionRowBuilder().addComponents(select);
|
||||
const rowButton = new ActionRowBuilder().addComponents(
|
||||
new ButtonBuilder()
|
||||
.setCustomId('mostrarDropdown')
|
||||
.setLabel('Escolher Recurso')
|
||||
.setStyle(1) // Usando o valor numérico para PRIMARY (1)
|
||||
);
|
||||
|
||||
await interaction.editReply({
|
||||
content: '🛠️ Clica no botão para escolher o recurso:',
|
||||
components: [rowButton],
|
||||
ephemeral: true,
|
||||
});
|
||||
|
||||
// Espera pelo clique no botão
|
||||
const filter = (i) => i.customId === 'mostrarDropdown' && i.user.id === interaction.user.id;
|
||||
@ -108,7 +109,7 @@ module.exports = {
|
||||
if (i.customId === 'mostrarDropdown') {
|
||||
await i.update({
|
||||
content: '🛠️ Agora escolhe o recurso:',
|
||||
components: [rowSelect],
|
||||
components: [rowSelect], // Atualizamos com o select menu
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user