The code should print the Relationship's raw status when a relationship update occurs.
Actual Results
An error occurs:
Ignoring exception in on_relationship_update
Traceback (most recent call last):
File "/.../discord/client.py", line 462, in _run_event
await coro(*args, **kwargs)
File "/.../test.py", line 7, in on_relationship_update
print(after.raw_status)
File "/.../discord/relationship.py", line 169, in raw_status
return self.presence.client_status.status
File "/.../discord/relationship.py", line 145, in presence
return self._presence or state._presences.get(self.user.id) or state.create_offline_presence()
AttributeError: 'Relationship' object has no attribute '_presence'
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
[X] I have searched the open issues for duplicates.
[X] I have shared the entire traceback.
[X] I am using a user token (and it isn't visible in the code).
Summary
An AttributeError sometimes occurs when trying to read the raw_status attribute of a Relationship
Reproduction Steps
Run the code below, then open Discord and friend a user. The error will occur.
Code
Expected Results
The code should print the Relationship's raw status when a relationship update occurs.
Actual Results
An error occurs:
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