Skip to content

Commit

Permalink
Fix deserialization of interaction components (#2711)
Browse files Browse the repository at this point in the history
* Fix deserialization of `TextInput`

* Fix deserialization of `Modal`
  • Loading branch information
WitchBoo authored Aug 2, 2024
1 parent 9ae7e5c commit fb1a339
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public TextInputImpl(DataObject object)
object.getString("custom_id"),
TextInputStyle.fromKey(object.getInt("style", -1)),
object.getString("label", null),
object.getInt("min_Length", -1),
object.getInt("min_length", -1),
object.getInt("max_length", -1),
object.getBoolean("required", true),
object.getString("value", null),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class ModalImpl implements Modal

public ModalImpl(DataObject object)
{
this.id = object.getString("id");
this.id = object.getString("custom_id");
this.title = object.getString("title");
this.components = object.optArray("components").orElseGet(DataArray::empty)
.stream(DataArray::getObject)
Expand Down

0 comments on commit fb1a339

Please sign in to comment.