Skip to content

Conversation

@Soheab
Copy link
Contributor

@Soheab Soheab commented Nov 29, 2025

Summary

This PR adds a new event called on_raw_member_update. This event is dispatched regardless of whether the member is cached. Handy for bots with chunking disabled and other reasons.

Fixes #3001

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.

@pycord-app
Copy link

pycord-app bot commented Nov 29, 2025

Thanks for opening this pull request!
Please make sure you have read the Contributing Guidelines and Code of Conduct.

This pull request can be checked-out with:

git fetch origin pull/3012/head:pr-3012
git checkout pr-3012

This pull request can be installed with:

pip install git+https://github.com/Pycord-Development/pycord@refs/pull/3012/head

@Soheab Soheab force-pushed the feat/onrawmemberupdate branch from 385d39a to e13a20a Compare November 29, 2025 18:12
Lulalaby
Lulalaby previously approved these changes Nov 29, 2025
@Paillat-dev Paillat-dev added hold: testing This pull request requires further testing priority: medium Medium Priority labels Nov 29, 2025

self.premium_since = utils.parse_time(data.get("premium_since"))
self._roles = utils.SnowflakeList(map(int, data["roles"]))
self._roles = utils.SnowflakeList(map(int, data["roles"])) # type: ignore # the API is the same
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# the API is the same

What do you mean ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type error is

Cannot assign to attribute "_roles" for class "Member*"
  "array[int]" is not assignable to "SnowflakeList"

SnowflakeList is a subclass of array.array, so same type.

Co-authored-by: Paillat <[email protected]>
Signed-off-by: Soheab <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hold: testing This pull request requires further testing priority: medium Medium Priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make on_member_update fire even when the member is not cached

4 participants