Skip to content

Commit 07b6ee0

Browse files
orarangeLulalabyPaillat-dev
authored
fix: View.from_dict() always returns None (#3181)
Co-authored-by: Lala Sabathil <lala@pycord.dev> Co-authored-by: Paillat <paillat@pycord.dev> Co-authored-by: Paillat <jeremiecotti@ik.me>
1 parent d9890f3 commit 07b6ee0

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ These changes are available on the `master` branch, but have not yet been releas
1818

1919
- Fixed a `TypeError` when using `Label.set_select` and not providing `default_values`.
2020
([#3171](https://github.com/Pycord-Development/pycord/pull/3171))
21+
- Fixed `View.from_dict()` incorrectly returning `None`.
22+
([#3181](https://github.com/Pycord-Development/pycord/pull/3181))
2123

2224
### Deprecated
2325

discord/ui/view.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,7 @@ def from_dict(
701701
components = [_component_factory(d) for d in data]
702702
for component in _walk_all_components(components):
703703
view.add_item(_component_to_item(component))
704+
return view
704705

705706
def add_item(self, item: ViewItem[V]) -> Self:
706707
"""Adds an item to the view. Attempting to add a :class:`~discord.ui.ActionRow` will add its children instead.

0 commit comments

Comments
 (0)