Skip to content

Commit

Permalink
Merge branch 'monetization' of https://github.com/plun1331/pycord int…
Browse files Browse the repository at this point in the history
…o monetization
  • Loading branch information
plun1331 authored Dec 4, 2023
2 parents 0b1f174 + e6b28f7 commit b50449e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ These changes are available on the `master` branch, but have not yet been releas
([#2271](https://github.com/Pycord-Development/pycord/pull/2271))
- Fixed `AttributeError` when serializing commands with `Annotated` type hints.
([#2243](https://github.com/Pycord-Development/pycord/pull/2243))
- Fixed `Intents.all()` returning the wrong value.
([#2257](https://github.com/Pycord-Development/pycord/issues/2257))

## [2.4.1] - 2023-03-20

Expand Down
4 changes: 2 additions & 2 deletions discord/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,8 @@ def __init__(self, **kwargs: bool):
@classmethod
def all(cls: type[Intents]) -> Intents:
"""A factory method that creates a :class:`Intents` with everything enabled."""
bits = max(cls.VALID_FLAGS.values()).bit_length()
value = (1 << bits) - 1
value = sum({1 << (flag.bit_length() - 1) for flag in cls.VALID_FLAGS.values()})

self = cls.__new__(cls)
self.value = value
return self
Expand Down

0 comments on commit b50449e

Please sign in to comment.