Skip to content

Commit

Permalink
fix: attribute error for user in messageinteraction(#1459)
Browse files Browse the repository at this point in the history
  • Loading branch information
Damego authored Jun 24, 2023
1 parent b23fe82 commit 60edb6f
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit 60edb6f

Please sign in to comment.