fix: AttributeError when fetching a message from a PartialMessageable that has a thread - #3309
Open
Paillat-dev wants to merge 8 commits into
Open
fix: AttributeError when fetching a message from a PartialMessageable that has a thread#3309Paillat-dev wants to merge 8 commits into
AttributeError when fetching a message from a PartialMessageable that has a thread#3309Paillat-dev wants to merge 8 commits into
Conversation
|
Thanks for opening this pull request! This pull request can be checked-out with: git fetch origin pull/3309/head:pr-3309
git checkout pr-3309This pull request can be installed with: pip install git+https://github.com/Pycord-Development/pycord@refs/pull/3309/head |
AttributeError when fetching a message from a PartialMessageable that has a thread
Member
Author
|
(this would have been fixed by better typing smhhhhhhh) |
vmphase
previously approved these changes
Jul 21, 2026
Member
|
Don't forget about the changelog. |
Signed-off-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com>
Dorukyum
enabled auto-merge (squash)
August 22, 2026 13:09
JustaSqu1d
requested changes
Aug 23, 2026
| guild=self.guild, state=self._state, data=data["thread"] | ||
| self.thread: Thread | None = None | ||
| if thread_data := data.get("thread"): | ||
| # When fetching from a PartialMessageable we don't have a guild so we need to fallback here |
Member
There was a problem hiding this comment.
Suggested change
| # When fetching from a PartialMessageable we don't have a guild so we need to fallback here | |
| # When fetching from a PartialMessageable, we don't have a guild so we need to fallback here |
| - Fix `SyntaxWarning` about `return` in a `finally` block raised on Python 3.14+ | ||
| - Fixed `SyntaxWarning` about `return` in a `finally` block raised on Python 3.14+ | ||
| ([#3332](https://github.com/Pycord-Development/pycord/pull/3334)) | ||
| - Fixed `AttributeError` when fetching a message from a `PartialMessageable` that has a |
Member
There was a problem hiding this comment.
Suggested change
| - Fixed `AttributeError` when fetching a message from a `PartialMessageable` that has a | |
| - Fixed `AttributeError` when fetching a message from a `PartialMessageable` object that has a |
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
When fetching a message that has a thread from a
PartialMessageablewe don't have a guild so it breaks with:Information
examples, ...).
Checklist
type: ignorecomments were used, a comment is also left explaining why.