Change in ActionRow stuff
Feeling a bit stupid, what change in v14 is related to this being needed?
row
is an ActionRowBuilder
, not a received row.
27 Replies
hmmm
console.log(row)
returns:
what?
ya v14 is confusing
hold on
why the "data"?
like after !x.
No idea what that's for exactly
same
Are you running into a particular issue?
data is meant to just be the internal storage
It's for removing any buttons that aren't function buttons (only keep LINK buttons)
Right, so modifying an actionrowbuilder?
To remove buttons from it?
oh i see
Yeah
thats why its more complicated than usual
Yeah I said in the builders RFC this would be needed lol
Did I miss this change in the breaking changes?
also can someone help me in:
https://discord.com/channels/222078108977594368/998564684053614692
I would probably do
row.setComponents(row.components.filter(x => x.style === ButtonStyle.Link))
Could you not advertise your question in other people's threads? Very rudesry
ComponentType.Link thats new
Oh oops
ButtonStyle.Link
I am confused
I'm probably doing something obviously wrong
Hmmmm why didn't the enum work
nvm. x.data.style
Oh right
Which is what also confused me from the start
Fuck I hate builders
My bad
So, is this data property a new v14 thing I missed somewhere?
Nope
Has been in builders all along as far as I know
So the change is that in
row.components.filter(x => !x.customId)
, x.<customId>
no longer exists?
I've never worked with anything other than builders for message components, but I might have to switch to avoid confusing myself 😅
Oh well, looking into ditching the builder method
This seems to do the trick after I've remade all the components without builders