File tree Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -88,12 +88,13 @@ class ModalSubmitInteraction extends BaseInteraction {
8888 * @returns {ModalData[] }
8989 */
9090 static transformComponent ( rawComponent ) {
91- return {
92- value : rawComponent . value ,
93- type : rawComponent . type ,
94- customId : rawComponent . custom_id ,
95- components : rawComponent . components ?. map ( c => this . transformComponent ( c ) ) ,
96- } ;
91+ return rawComponent . components
92+ ? { type : rawComponent . type , components : rawComponent . components . map ( c => this . transformComponent ( c ) ) }
93+ : {
94+ value : rawComponent . value ,
95+ type : rawComponent . type ,
96+ customId : rawComponent . custom_id ,
97+ } ;
9798 }
9899
99100 /**
Original file line number Diff line number Diff line change @@ -2228,17 +2228,15 @@ export interface TextInputModalData extends BaseModalData {
22282228
22292229export interface ActionRowModalData {
22302230 type : ComponentType . ActionRow ;
2231- components : ModalData [ ] ;
2231+ components : TextInputModalData [ ] ;
22322232}
22332233
2234- export type ModalData = TextInputModalData | ActionRowModalData ;
2235-
22362234export class ModalSubmitFields {
22372235 constructor ( components : ModalActionRowComponent [ ] [ ] ) ;
2238- public components : ActionRow < ModalActionRowComponent > ;
2236+ public components : ActionRowModalData [ ] ;
22392237 public fields : Collection < string , ModalActionRowComponent > ;
2240- public getField < T extends ComponentType > ( customId : string , type : T ) : { type : T } & ModalData ;
2241- public getField ( customId : string , type ?: ComponentType ) : ModalData ;
2238+ public getField < T extends ComponentType > ( customId : string , type : T ) : { type : T } & TextInputModalData ;
2239+ public getField ( customId : string , type ?: ComponentType ) : TextInputModalData ;
22422240 public getTextInputValue ( customId : string ) : string ;
22432241}
22442242
You can’t perform that action at this time.
0 commit comments