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 {
88
88
* @returns {ModalData[] }
89
89
*/
90
90
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
+ } ;
97
98
}
98
99
99
100
/**
Original file line number Diff line number Diff line change @@ -2228,17 +2228,15 @@ export interface TextInputModalData extends BaseModalData {
2228
2228
2229
2229
export interface ActionRowModalData {
2230
2230
type : ComponentType . ActionRow ;
2231
- components : ModalData [ ] ;
2231
+ components : TextInputModalData [ ] ;
2232
2232
}
2233
2233
2234
- export type ModalData = TextInputModalData | ActionRowModalData ;
2235
-
2236
2234
export class ModalSubmitFields {
2237
2235
constructor ( components : ModalActionRowComponent [ ] [ ] ) ;
2238
- public components : ActionRow < ModalActionRowComponent > ;
2236
+ public components : ActionRowModalData [ ] ;
2239
2237
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 ;
2242
2240
public getTextInputValue ( customId : string ) : string ;
2243
2241
}
2244
2242
You can’t perform that action at this time.
0 commit comments