Migrating to v14 (Typescript)

Hi there I'm having trouble porting this v13 code over to v14

1 const msg = interaction.targetMessage as Message;
2 
3 const components = msg?.components;
4 
5 let row = components.find(
6   (x) => x.components.length < 5
7 );
8 
9 if (!row) {
10   components.push(new MessageActionRow());
11   row = components[components.length - 1];
12 }
13 
14 row.addComponents(button);


More specifically, in v14, ActionRow is private and components won't accept ActionRowBuilder because
Type 'ActionRowBuilder<AnyComponentBuilder>' is missing the following properties from type 'ActionRow<MessageActionRowComponent>': type, equals
.
Was this page helpful?