#Need help with embeds and buttons!

1 messages · Page 1 of 1 (latest)

flint gate
#

here's my code

#
    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](https://cdn.discordapp.com/emojis/1046691734089900093.webp?size=128 "DisTree") 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 ![Golden_moderator](https://cdn.discordapp.com/emojis/1047107050997567529.webp?size=128 "Golden_moderator") Server Owner', value: '> <886511660611805205>', inline: true },
        { name: '\n ![select](https://cdn.discordapp.com/emojis/1048271201887338548.webp?size=128 "select") Created', value: '> November 5, 2022', inline: true },
    )

    .addFields(
        { name: '\n ![notification](https://cdn.discordapp.com/emojis/1048250413540966430.webp?size=128 "notification") Total Roles', value: '> 73 Roles'},
        { name: '\n ![Cute_Heart](https://cdn.discordapp.com/emojis/1048258028014678036.webp?size=128 "Cute_Heart") 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(`![DisTree](https://cdn.discordapp.com/emojis/1046691734089900093.webp?size=128 "DisTree") 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.

spiral pumice
#

you need to pass the set of buttons you want to stay (empty array if none) to the #update call in components:

flint gate
#

alr

#

idk how to really