diff --git a/discord/threads.py b/discord/threads.py index 0af71f3bd0df..d53ef53eab6b 100644 --- a/discord/threads.py +++ b/discord/threads.py @@ -1015,7 +1015,7 @@ def _from_data(self, data: Union[BaseThreadMemberPayload, ThreadMemberPayload]) state._handle_member_update(guild, member_data) presence = data.get('presence') if presence is not None: - state._parse_presence_update(guild, presence) + state._handle_presence_update(guild, presence) @property def thread(self) -> Thread: diff --git a/docs/api.rst b/docs/api.rst index 0b7d12f00539..5afb16be87e5 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -979,13 +979,34 @@ Members ~~~~~~~~ .. function:: on_member_join(member) - on_member_remove(member) - Called when a :class:`Member` join or leaves a :class:`Guild`. + Called when a :class:`Member` joins a :class:`Guild`. - :param member: The member who joined or left. + :param member: The member who joined. + :type member: :class:`Member` + +.. function:: on_member_remove(member) + + Called when a :class:`Member` leaves a :class:`Guild`. + + If the guild or member could not be found in the internal cache this event + will not be called, you may use :func:`on_raw_member_remove` instead. + + :param member: The member who left. :type member: :class:`Member` +.. function:: on_raw_member_remove(payload) + + Called when a :class:`Member` leaves a :class:`Guild`. + + Unlike :func:`on_member_remove` + this is called regardless of the guild or member being in the internal cache. + + .. versionadded:: 2.1 + + :param payload: The raw event payload data. + :type payload: :class:`RawMemberRemoveEvent` + .. function:: on_member_update(before, after) Called when a :class:`Member` updates their profile. @@ -7911,6 +7932,11 @@ RawEvent .. autoclass:: RawThreadDeleteEvent() :members: +.. attributetable:: RawMemberRemoveEvent + +.. autoclass:: RawMemberRemoveEvent() + :members: + .. attributetable:: RawMessageAckEvent .. autoclass:: RawMessageAckEvent() diff --git a/docs/guild_subscriptions.rst b/docs/guild_subscriptions.rst index d04c57b6cbd8..193379974f56 100644 --- a/docs/guild_subscriptions.rst +++ b/docs/guild_subscriptions.rst @@ -1,3 +1,5 @@ +:orphan: + .. currentmodule:: discord .. _guild_subscriptions: