@@ -174,6 +174,8 @@ import {
174174 ChatInputApplicationCommandData ,
175175 ApplicationCommandPermissionsManager ,
176176 GuildOnboarding ,
177+ StringSelectMenuComponentData ,
178+ ButtonComponentData ,
177179} from '.' ;
178180import { expectAssignable , expectNotAssignable , expectNotType , expectType } from 'tsd' ;
179181import type { ContextMenuCommandBuilder , SlashCommandBuilder } from '@discordjs/builders' ;
@@ -532,10 +534,10 @@ client.on('messageCreate', async message => {
532534
533535 // Check that both builders and builder data can be sent in messages
534536 const row = new ActionRowBuilder < MessageActionRowComponentBuilder > ( ) ;
535- const buttonsRow : ActionRowData < MessageActionRowComponentData > = {
537+
538+ const rawButtonsRow : ActionRowData < ButtonComponentData > = {
536539 type : ComponentType . ActionRow ,
537540 components : [
538- new ButtonBuilder ( ) ,
539541 { type : ComponentType . Button , label : 'test' , style : ButtonStyle . Primary , customId : 'test' } ,
540542 {
541543 type : ComponentType . Button ,
@@ -545,21 +547,34 @@ client.on('messageCreate', async message => {
545547 } ,
546548 ] ,
547549 } ;
548- const selectsRow : ActionRowData < MessageActionRowComponentData > = {
550+
551+ const buttonsRow : ActionRowData < ButtonBuilder > = {
552+ type : ComponentType . ActionRow ,
553+ components : [ new ButtonBuilder ( ) ] ,
554+ } ;
555+
556+ const rawStringSelectMenuRow : ActionRowData < StringSelectMenuComponentData > = {
549557 type : ComponentType . ActionRow ,
550558 components : [
551- new StringSelectMenuBuilder ( ) ,
552559 {
553560 type : ComponentType . StringSelect ,
554- label : 'select menu' ,
555561 options : [ { label : 'test' , value : 'test' } ] ,
556562 customId : 'test' ,
557563 } ,
558564 ] ,
559565 } ;
560566
567+ const stringSelectRow : ActionRowData < StringSelectMenuBuilder > = {
568+ type : ComponentType . ActionRow ,
569+ components : [ new StringSelectMenuBuilder ( ) ] ,
570+ } ;
571+
561572 const embedData = { description : 'test' , color : 0xff0000 } ;
562- channel . send ( { components : [ row , buttonsRow , selectsRow ] , embeds : [ embed , embedData ] } ) ;
573+
574+ channel . send ( {
575+ components : [ row , rawButtonsRow , buttonsRow , rawStringSelectMenuRow , stringSelectRow ] ,
576+ embeds : [ embed , embedData ] ,
577+ } ) ;
563578} ) ;
564579
565580client . on ( 'messageDelete' , ( { client } ) => expectType < Client < true > > ( client ) ) ;
0 commit comments