Skip to content

Commit

Permalink
change ModalBuilder components to ActionRowBuilders
Browse files Browse the repository at this point in the history
  • Loading branch information
jr1221 committed Sep 19, 2023
1 parent 860d030 commit b372bdb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/src/builders/interaction_response.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,14 @@ class ModalBuilder extends CreateBuilder<ModalBuilder> {

String title;

List<TextInputBuilder> components;
List<ActionRowBuilder> components;

ModalBuilder({required this.customId, required this.title, required this.components});

@override
Map<String, Object?> build() => {
'custom_id': customId,
'title': title,
'components': [
for (TextInputBuilder component in components) ActionRowBuilder(components: [component]).build()
],
'components': components.map((e) => e.build()).toList(),
};
}

0 comments on commit b372bdb

Please sign in to comment.