Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cannot get user of message interaction #1459

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions interactions/models/discord/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,10 @@ def _process_dict(cls, data: Dict[str, Any], client: "Client") -> Dict[str, Any]
data["user_id"] = client.cache.place_user_data(user_data).id
return data

async def user(self) -> "models.User":
@property
def user(self) -> "models.User":
"""Get the user associated with this interaction."""
return await self.get_user(self._user_id)
return self.client.get_user(self._user_id)


@attrs.define(eq=False, order=False, hash=False, kw_only=False)
Expand Down