fix: View.from_dict() always returns None#3181
Merged
Paillat-dev merged 7 commits intoPycord-Development:masterfrom Mar 28, 2026
Merged
fix: View.from_dict() always returns None#3181Paillat-dev merged 7 commits intoPycord-Development:masterfrom
View.from_dict() always returns None#3181Paillat-dev merged 7 commits intoPycord-Development:masterfrom
Conversation
|
Thanks for opening this pull request! This pull request can be checked-out with: git fetch origin pull/3181/head:pr-3181
git checkout pr-3181This pull request can be installed with: pip install git+https://github.com/Pycord-Development/pycord@refs/pull/3181/head |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a regression in discord.ui.View.from_dict() where the method constructed a View but never returned it, causing callers to receive None.
Changes:
- Add the missing
return viewstatement toView.from_dict().
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Icebluewolf
requested changes
Mar 25, 2026
Member
Icebluewolf
left a comment
There was a problem hiding this comment.
Good catch. However, you will need a change log as this fixes a bug in a released version.
Icebluewolf
previously approved these changes
Mar 25, 2026
Member
|
Merge conflicts |
d2d6a61 to
15da4fd
Compare
View.from_dict() always returns None
Paillat-dev
approved these changes
Mar 27, 2026
Dorukyum
previously approved these changes
Mar 28, 2026
Paillat-dev
requested changes
Mar 28, 2026
Signed-off-by: Paillat <jeremiecotti@ik.me>
Paillat-dev
approved these changes
Mar 28, 2026
07b6ee0
into
Pycord-Development:master
27 of 28 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
View.from_dict()was missing areturn viewstatement, causing it to always returnNone.This was likely dropped during the refactor in #2904.
View.from_message()andDesignerView.from_dict()have the correct return statement.Generative AI (Codex) was used for bug discovery and code review only.
Information
Checklist
type: ignorecomments were used, a comment is also left explaining why.