diff --git a/CHANGELOG.md b/CHANGELOG.md index 4209b0dbb0..1c71fca881 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ These changes are available on the `master` branch, but have not yet been releas - Fixed a `TypeError` when using `Label.set_select` and not providing `default_values`. ([#3171](https://github.com/Pycord-Development/pycord/pull/3171)) +- Fixed `View.from_dict()` incorrectly returning `None`. + ([#3181](https://github.com/Pycord-Development/pycord/pull/3181)) ### Deprecated diff --git a/discord/ui/view.py b/discord/ui/view.py index 281df6fb47..19a12ec79f 100644 --- a/discord/ui/view.py +++ b/discord/ui/view.py @@ -701,6 +701,7 @@ def from_dict( components = [_component_factory(d) for d in data] for component in _walk_all_components(components): view.add_item(_component_to_item(component)) + return view def add_item(self, item: ViewItem[V]) -> Self: """Adds an item to the view. Attempting to add a :class:`~discord.ui.ActionRow` will add its children instead.