change container button on interaction update

Hey how can i change something in the container when i update the interaction i have tried it like this but it didnt worked
interaction.update({
components: [ new ContainerBuilder(interaction.message.components[0] as APIContainerComponent) ],
flags: [MessageFlags.IsComponentsV2]
})
interaction.update({
components: [ new ContainerBuilder(interaction.message.components[0] as APIContainerComponent) ],
flags: [MessageFlags.IsComponentsV2]
})
No description
6 Replies
d.js toolkit
d.js toolkit2mo ago
dandeib
dandeibOP2mo ago
i could just copy and paste the container builder but is there a better way? Ok but how can i change something without copy pasting the hole ContainerBuilder
d.js docs
d.js docs2mo ago
:method: ContainerBuilder#spliceComponents() discord.js@14.23.2 Removes, replaces, or inserts components for this container.
NyR
NyR2mo ago
Use that
dandeib
dandeibOP2mo ago
Ok ill try Got it thx
d.js toolkit
d.js toolkit2mo ago
The thread owner has marked this issue as solved.

Did you find this page helpful?