Closed LostXOR closed 1 year ago
Must've forgotten about this when documenting the presence changes sweep.
So the way user presence works is kinda weird (without even getting into subscriptions). For every guild member there is a per-guild presence. However, there's also an "overall" user presence sent to friends/implicit relationships independent of any guild. Because of this, for these presences there is not a Member object, only a Relationship object.
For now, I'm dispatching the same presence_update
for both. Maybe a separate event needs to be introduced. Either way, documentation must be updated.
I ended up leaving this as-is and documenting the change for release. This might get separated in v2.1 or later, but I need more general feedback.
Summary
The event on_presence_update is called a third time with a Relationship instead of a Member if the user is a friend.
Reproduction Steps
Run the code. While the code is running, have a server member who is also a friend change their status.
Code
Expected Results
The program should print
(I assume the event triggering twice is by design. If not, that's another bug.)
Actual Results
The program prints
or sometimes
As shown here on the API reference,
on_presence_update
should be called with twoMember
objects, not aRelationship
.System Information
discord.py-self is not installed globally, and I'm not sure how to run that command on a local module. I'm using the latest commit from 2 days ago.
Checklist
Additional Information
No response