Is it possible to get a container or button in container from an already sent message?

I'm making a ticket bot, and I have a manage_tickets command that toggles ticket creation by disabling/enabling the button that opens the ticket. I decided to switch from embeds to containers, and now I can't figure out how to get container or a button from message
6 Replies
d.js toolkit
d.js toolkit2mo ago
Mafia
Mafia2mo ago
Are you looking to reconstruct the container or just read the data?
G1itch
G1itchOP2mo ago
Reconstruct
Mafia
Mafia2mo ago
feed the toJSON() into the containerBuilder like this
const messageComponents = interaction.message.components.map(c => createComponentBuilder(c.toJSON()))
const messageComponents = interaction.message.components.map(c => createComponentBuilder(c.toJSON()))
G1itch
G1itchOP2mo ago
thanks
d.js toolkit
d.js toolkit2mo ago
The thread owner has marked this issue as solved.

Did you find this page helpful?