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

Utils function for snowflake worker and process ids, with increment #770

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Shell1010
Copy link

Summary

Adds the worker and process IDs from snowflakes as attributes for I think most of the objects that support it. Alongside the increment.

General Info

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • This PR fixes an issue (please put issue # in summary).
  • 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, ...)

Copy link
Owner

@dolfies dolfies left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. The additions to utils.py are fine (though please add the new functions to __all__), but I feel like the addition of properties to nearly every object is just unnecessary pollution, especially as this information is not very useful most of the time.

@Shell1010 Shell1010 reopened this Jan 3, 2025
@Shell1010
Copy link
Author

I've removed the properties I made to the previous objects and kept only the functions in utils.py. I've also added it to __all__ as requested.

Copy link
Owner

@dolfies dolfies left a comment

Choose a reason for hiding this comment

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

Please apply to the other two as well

discord/utils.py Show resolved Hide resolved
discord/utils.py Outdated Show resolved Hide resolved
discord/utils.py Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants