From f5db60e4e18f60d0dc4c9e7265621c70c91bbd96 Mon Sep 17 00:00:00 2001 From: oraran Date: Wed, 25 Mar 2026 12:04:18 +0900 Subject: [PATCH 1/3] fix: View.from_dict() missing return statement --- discord/ui/view.py | 1 + 1 file changed, 1 insertion(+) 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. From 15da4fd8bdce3e24e51d3c5ee2dcdfd2a9f25cc5 Mon Sep 17 00:00:00 2001 From: oraran Date: Wed, 25 Mar 2026 12:29:50 +0900 Subject: [PATCH 2/3] docs: add changelog entry for View.from_dict() fix --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4209b0dbb0..0cddfd5edf 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()` always returning `None` due to a missing `return` statement. + ([#3181](https://github.com/Pycord-Development/pycord/pull/3181)) ### Deprecated From 0dd891f8b1f9213331bbc018d9ab7376b08c9519 Mon Sep 17 00:00:00 2001 From: Paillat Date: Sat, 28 Mar 2026 16:40:26 +0100 Subject: [PATCH 3/3] Update CHANGELOG.md Signed-off-by: Paillat --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cddfd5edf..1c71fca881 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ 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()` always returning `None` due to a missing `return` statement. +- Fixed `View.from_dict()` incorrectly returning `None`. ([#3181](https://github.com/Pycord-Development/pycord/pull/3181)) ### Deprecated