#Need help with embeds and buttons!
1 messages · Page 1 of 1 (latest)
const { ActionRowBuilder, ButtonBuilder, EmbedBuilder, ButtonStyle } = require(`discord.js`);
const button = new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setCustomId('Staff Team')
.setLabel('Staff Team')
.setStyle(ButtonStyle.Primary),
);
const button2 = new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setCustomId('sinfo2')
.setLabel('back')
.setStyle(ButtonStyle.Primary),
);
const embed = new EmbedBuilder()
.setColor("0x2f3136")
.setTitle(` DisTree`)
.setDescription(`> DisTree is a place where you can engage with a community of people to have meaningful conversations, hang out with other discord users and DisTree members. DisTree is an unofficial discord and moderation support server with a lots of peer support facilities.`)
.setThumbnail(`https://images-ext-1.discordapp.net/external/OEahzMZfCg1g2nDj0KnZKE_nVHMVDH6ctdysb_5Y7CA/%3Fsize%3D1024/https/cdn.discordapp.com/icons/1038508436779966464/a_48d2f68ceb5a3e8a0decfc0a09638ac5.gif`)
.addFields(
{ name: '\n  Server Owner', value: '> <886511660611805205>', inline: true },
{ name: '\n  Created', value: '> November 5, 2022', inline: true },
)
.addFields(
{ name: '\n  Total Roles', value: '> 73 Roles'},
{ name: '\n  Vanity Invite', value: '> https://dsc.gg/distree'},
)
.setImage('https://cdn.discordapp.com/attachments/1046655332904083546/1046853444234903722/Bez_naziva.png')
const embed2 = new EmbedBuilder()
.setColor("0x2f3136")
.setTitle(` Staff Team`)
.setDescription(`**Moderators** \n > <922474979629613126>, @silent oasis \n > <866627565473366046>, <534064040788492295> \n > @polar forge \n \n **Administrators** \n > @ruby yoke, <974220809503653938> `)
message.channel.send({ embeds: [embed], components: [button]});
const collector = message.channel.createMessageComponentCollector();
collector.on('collect', async i => {
await i.update({ embeds: [embed2]})
})
}```
i want to remove the button from 2nd embed
after clicking on the first embed button.
you need to pass the set of buttons you want to stay (empty array if none) to the #update call in components: