How to get text from TextDisplayBuilder (Components v2)

I need help with getting the text from TextDisplayBuilder which is inside of a ContainerBuilder. For example this is how you get text from embeds description: const originalText = interaction.message.embeds[0].description; and i need to do the same for TextDisplayBuilder which is inside of a ContainerBuilder. Thanks for every answer
2 Replies
d.js toolkit
d.js toolkit3w ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Samtino
Samtino3w ago
Components and Embeds are mutually exclusive. message.embeds is guaranteed to be null You have to use message.components[0] and you'll get the data for the container. You'll need to go deeper into the container to get the text

Did you find this page helpful?