Function to get Component Data by ID

I saw that there is a way to pass a numeric ID to a message component, which serves as an identifier to recognize an element, is it possible to get it with some function? That already exists of course or do I need to implement it if I need it?
4 Replies
d.js toolkit
d.js toolkit3w ago
monbrey
monbrey3w ago
There is no existing function for this You would filter recursively through message.components to find items by ID
Quir
QuirOP3w ago
Thx If I create it, do you think it would be valid to create a PR or method within interaction.message.components.GetComponentbyID(ID) or does this end up being something extremely specific that is rarely used?
monbrey
monbrey3w ago
We would not want to support that helper method, no And message.components is just an array, not a custom class

Did you find this page helpful?