Skip to content

Commit

Permalink
Remove raw object creation guild.py
Browse files Browse the repository at this point in the history
  • Loading branch information
EvieePy committed Dec 21, 2024
1 parent abfd31b commit 39708ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions discord/guild.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,8 @@ def _from_data(self, guild: GuildPayload) -> None:

empty_tuple = ()
for presence in guild.get('presences', []):
raw = RawPresenceUpdateEvent(data=presence, state=self._state)
member = self.get_member(raw.user_id)
user_id = int(presence['user']['id'])
member = self.get_member(user_id)

if member is not None:
member._perf_presence_update(presence, empty_tuple) # type: ignore
Expand Down

0 comments on commit 39708ef

Please sign in to comment.