Repository navigation
fix: AttributeError when fetching a message from a PartialMessageable that has a thread - #3309
Paillat-dev wants to merge 14 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
|
(this would have been fixed by better typing smhhhhhhh) |
|
Don't forget about the changelog. |
Signed-off-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com>
Co-authored-by: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Signed-off-by: Paillat <jeremiecotti@ik.me>
Co-authored-by: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Signed-off-by: Paillat <jeremiecotti@ik.me>
Signed-off-by: Paillat <paillat@pycord.dev>
| self.thread = guild.get_thread(int(thread_data["id"])) or Thread( | ||
| guild=guild, state=self._state, data=thread_data | ||
| ) |
There was a problem hiding this comment.
I remember doing this for a specific reason, I'll have to take a look
There was a problem hiding this comment.
This is a worthy note, Copilot is surprisingly right.
There was a problem hiding this comment.
I'm not sure but I believe the thread_data there is partial and since in theory we are supposed to have it always in sync I preferred that one.
There was a problem hiding this comment.
maybe at least leave a comment explaining
Signed-off-by: plun1331 <plun1331@gmail.com>

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.